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

Unified Diff: src/svg/SkSVGDevice.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/sfnt/SkTTCFHeader.h ('k') | src/utils/SkTFitsIn.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/svg/SkSVGDevice.cpp
diff --git a/src/svg/SkSVGDevice.cpp b/src/svg/SkSVGDevice.cpp
index 9fd7ce737b60d0feaab862648cfa31b3d2c265e4..64f74c8b5bc82e2c1b7c35a4e1b3b3c6a43deac5 100644
--- a/src/svg/SkSVGDevice.cpp
+++ b/src/svg/SkSVGDevice.cpp
@@ -42,7 +42,7 @@ static const char* cap_map[] = {
"round", // kRound_Cap
"square" // kSquare_Cap
};
-SK_COMPILE_ASSERT(SK_ARRAY_COUNT(cap_map) == SkPaint::kCapCount, missing_cap_map_entry);
+static_assert(SK_ARRAY_COUNT(cap_map) == SkPaint::kCapCount, "missing_cap_map_entry");
static const char* svg_cap(SkPaint::Cap cap) {
SkASSERT(cap < SK_ARRAY_COUNT(cap_map));
@@ -55,7 +55,7 @@ static const char* join_map[] = {
"round", // kRound_Join
"bevel" // kBevel_Join
};
-SK_COMPILE_ASSERT(SK_ARRAY_COUNT(join_map) == SkPaint::kJoinCount, missing_join_map_entry);
+static_assert(SK_ARRAY_COUNT(join_map) == SkPaint::kJoinCount, "missing_join_map_entry");
static const char* svg_join(SkPaint::Join join) {
SkASSERT(join < SK_ARRAY_COUNT(join_map));
@@ -68,8 +68,8 @@ static const char* text_align_map[] = {
"middle", // kCenter_Align
"end" // kRight_Align
};
-SK_COMPILE_ASSERT(SK_ARRAY_COUNT(text_align_map) == SkPaint::kAlignCount,
- missing_text_align_map_entry);
+static_assert(SK_ARRAY_COUNT(text_align_map) == SkPaint::kAlignCount,
+ "missing_text_align_map_entry");
static const char* svg_text_align(SkPaint::Align align) {
SkASSERT(align < SK_ARRAY_COUNT(text_align_map));
return text_align_map[align];
« no previous file with comments | « src/sfnt/SkTTCFHeader.h ('k') | src/utils/SkTFitsIn.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698