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

Unified Diff: include/core/SkPath.h

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 | « include/core/SkImageInfo.h ('k') | include/core/SkTypes.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkPath.h
diff --git a/include/core/SkPath.h b/include/core/SkPath.h
index dc50ae76c317b1ad487da5470ecb6f73c7698bf6..caf4cfe5ecc9aa0e4e189c96153ea3c8d0f4ff54 100644
--- a/include/core/SkPath.h
+++ b/include/core/SkPath.h
@@ -505,10 +505,10 @@ public:
* kInverseEvenOdd_FillType -> true
*/
static bool IsInverseFillType(FillType fill) {
- SK_COMPILE_ASSERT(0 == kWinding_FillType, fill_type_mismatch);
- SK_COMPILE_ASSERT(1 == kEvenOdd_FillType, fill_type_mismatch);
- SK_COMPILE_ASSERT(2 == kInverseWinding_FillType, fill_type_mismatch);
- SK_COMPILE_ASSERT(3 == kInverseEvenOdd_FillType, fill_type_mismatch);
+ static_assert(0 == kWinding_FillType, "fill_type_mismatch");
+ static_assert(1 == kEvenOdd_FillType, "fill_type_mismatch");
+ static_assert(2 == kInverseWinding_FillType, "fill_type_mismatch");
+ static_assert(3 == kInverseEvenOdd_FillType, "fill_type_mismatch");
return (fill & 2) != 0;
}
@@ -521,10 +521,10 @@ public:
* kInverseEvenOdd_FillType -> kEvenOdd_FillType
*/
static FillType ConvertToNonInverseFillType(FillType fill) {
- SK_COMPILE_ASSERT(0 == kWinding_FillType, fill_type_mismatch);
- SK_COMPILE_ASSERT(1 == kEvenOdd_FillType, fill_type_mismatch);
- SK_COMPILE_ASSERT(2 == kInverseWinding_FillType, fill_type_mismatch);
- SK_COMPILE_ASSERT(3 == kInverseEvenOdd_FillType, fill_type_mismatch);
+ static_assert(0 == kWinding_FillType, "fill_type_mismatch");
+ static_assert(1 == kEvenOdd_FillType, "fill_type_mismatch");
+ static_assert(2 == kInverseWinding_FillType, "fill_type_mismatch");
+ static_assert(3 == kInverseEvenOdd_FillType, "fill_type_mismatch");
return (FillType)(fill & 1);
}
« no previous file with comments | « include/core/SkImageInfo.h ('k') | include/core/SkTypes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698