diff options
author | bungeman <bungeman@google.com> | 2015-08-20 07:57:51 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-08-20 07:57:52 -0700 |
commit | 99fe82260633fcf5d92cca38d12ef0937ecca61c (patch) | |
tree | 258dedccd2b908de58f6b1ae7c67dbfbe7208866 /src/svg | |
parent | 915881fe743f9a789037695f543bc6ea189cd0cb (diff) |
Use static_assert instead of SK_COMPILE_ASSERT.
Now that static_assert is allowed, there is no need to use a non-
standard compile time assertion
Review URL: https://codereview.chromium.org/1306443004
Diffstat (limited to 'src/svg')
-rw-r--r-- | src/svg/SkSVGDevice.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/svg/SkSVGDevice.cpp b/src/svg/SkSVGDevice.cpp index 9fd7ce737b..64f74c8b5b 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]; |