Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(305)

Side by Side Diff: include/core/SkTypes.h

Issue 189093020: Fix (1 << 31) to (1u << 31) in SkOTTable_OS_2. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Pedantic Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « include/core/SkTemplates.h ('k') | src/sfnt/SkOTTableTypes.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2006 The Android Open Source Project 2 * Copyright 2006 The Android Open Source Project
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef SkTypes_DEFINED 8 #ifndef SkTypes_DEFINED
9 #define SkTypes_DEFINED 9 #define SkTypes_DEFINED
10 10
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 #define SK_DEVELOPER_TO_STRING() virtual void toString(SkString* str) con st SK_OVERRIDE; 120 #define SK_DEVELOPER_TO_STRING() virtual void toString(SkString* str) con st SK_OVERRIDE;
121 #else 121 #else
122 #define SkDEVCODE(code) 122 #define SkDEVCODE(code)
123 #define SK_DEVELOPER_TO_STRING() 123 #define SK_DEVELOPER_TO_STRING()
124 #endif 124 #endif
125 125
126 template <bool> 126 template <bool>
127 struct SkCompileAssert { 127 struct SkCompileAssert {
128 }; 128 };
129 129
130 // Uses static_cast<bool>(expr) instead of bool(expr) due to
131 // https://connect.microsoft.com/VisualStudio/feedback/details/832915
130 #define SK_COMPILE_ASSERT(expr, msg) \ 132 #define SK_COMPILE_ASSERT(expr, msg) \
131 typedef SkCompileAssert<(bool(expr))> msg[bool(expr) ? 1 : -1] SK_UNUSED 133 typedef SkCompileAssert<static_cast<bool>(expr)> \
134 msg[static_cast<bool>(expr) ? 1 : -1] SK_UNUSED
132 135
133 /* 136 /*
134 * Usage: SK_MACRO_CONCAT(a, b) to construct the symbol ab 137 * Usage: SK_MACRO_CONCAT(a, b) to construct the symbol ab
135 * 138 *
136 * SK_MACRO_CONCAT_IMPL_PRIV just exists to make this work. Do not use directly 139 * SK_MACRO_CONCAT_IMPL_PRIV just exists to make this work. Do not use directly
137 * 140 *
138 */ 141 */
139 #define SK_MACRO_CONCAT(X, Y) SK_MACRO_CONCAT_IMPL_PRIV(X, Y) 142 #define SK_MACRO_CONCAT(X, Y) SK_MACRO_CONCAT_IMPL_PRIV(X, Y)
140 #define SK_MACRO_CONCAT_IMPL_PRIV(X, Y) X ## Y 143 #define SK_MACRO_CONCAT_IMPL_PRIV(X, Y) X ## Y
141 144
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after
634 private: 637 private:
635 void* fPtr; 638 void* fPtr;
636 size_t fSize; // can be larger than the requested size (see kReuse) 639 size_t fSize; // can be larger than the requested size (see kReuse)
637 uint32_t fStorage[(kSize + 3) >> 2]; 640 uint32_t fStorage[(kSize + 3) >> 2];
638 }; 641 };
639 // Can't guard the constructor because it's a template class. 642 // Can't guard the constructor because it's a template class.
640 643
641 #endif /* C++ */ 644 #endif /* C++ */
642 645
643 #endif 646 #endif
OLDNEW
« no previous file with comments | « include/core/SkTemplates.h ('k') | src/sfnt/SkOTTableTypes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698