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

Unified Diff: src/core/SkClipStack.cpp

Issue 1306443004: Use static_assert instead of SK_COMPILE_ASSERT. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/core/SkCanvas.cpp ('k') | src/core/SkConvolver.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkClipStack.cpp
diff --git a/src/core/SkClipStack.cpp b/src/core/SkClipStack.cpp
index c4c68ced08af61f0f9156da451187488c252bd26..c359e87f216400157f509e17d530a8fa23eb811a 100644
--- a/src/core/SkClipStack.cpp
+++ b/src/core/SkClipStack.cpp
@@ -862,11 +862,11 @@ void SkClipStack::Element::dump() const {
"rrect",
"path"
};
- SK_COMPILE_ASSERT(0 == kEmpty_Type, type_str);
- SK_COMPILE_ASSERT(1 == kRect_Type, type_str);
- SK_COMPILE_ASSERT(2 == kRRect_Type, type_str);
- SK_COMPILE_ASSERT(3 == kPath_Type, type_str);
- SK_COMPILE_ASSERT(SK_ARRAY_COUNT(kTypeStrings) == kTypeCnt, type_str);
+ static_assert(0 == kEmpty_Type, "type_str");
+ static_assert(1 == kRect_Type, "type_str");
+ static_assert(2 == kRRect_Type, "type_str");
+ static_assert(3 == kPath_Type, "type_str");
+ static_assert(SK_ARRAY_COUNT(kTypeStrings) == kTypeCnt, "type_str");
static const char* kOpStrings[] = {
"difference",
@@ -876,13 +876,13 @@ void SkClipStack::Element::dump() const {
"reverse-difference",
"replace",
};
- SK_COMPILE_ASSERT(0 == SkRegion::kDifference_Op, op_str);
- SK_COMPILE_ASSERT(1 == SkRegion::kIntersect_Op, op_str);
- SK_COMPILE_ASSERT(2 == SkRegion::kUnion_Op, op_str);
- SK_COMPILE_ASSERT(3 == SkRegion::kXOR_Op, op_str);
- SK_COMPILE_ASSERT(4 == SkRegion::kReverseDifference_Op, op_str);
- SK_COMPILE_ASSERT(5 == SkRegion::kReplace_Op, op_str);
- SK_COMPILE_ASSERT(SK_ARRAY_COUNT(kOpStrings) == SkRegion::kOpCnt, op_str);
+ static_assert(0 == SkRegion::kDifference_Op, "op_str");
+ static_assert(1 == SkRegion::kIntersect_Op, "op_str");
+ static_assert(2 == SkRegion::kUnion_Op, "op_str");
+ static_assert(3 == SkRegion::kXOR_Op, "op_str");
+ static_assert(4 == SkRegion::kReverseDifference_Op, "op_str");
+ static_assert(5 == SkRegion::kReplace_Op, "op_str");
+ static_assert(SK_ARRAY_COUNT(kOpStrings) == SkRegion::kOpCnt, "op_str");
SkDebugf("Type: %s, Op: %s, AA: %s, Save Count: %d\n", kTypeStrings[fType],
kOpStrings[fOp], (fDoAA ? "yes" : "no"), fSaveCount);
« no previous file with comments | « src/core/SkCanvas.cpp ('k') | src/core/SkConvolver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698