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

Unified Diff: src/pdf/SkPDFGraphicState.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/pdf/SkPDFFont.cpp ('k') | src/pdf/SkPDFResourceDict.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pdf/SkPDFGraphicState.cpp
diff --git a/src/pdf/SkPDFGraphicState.cpp b/src/pdf/SkPDFGraphicState.cpp
index 55f3b3929fea31b3d3434bc36cb413ef000ff182..c4b6c20fe443532af774cf3aefb27d345ead32df 100644
--- a/src/pdf/SkPDFGraphicState.cpp
+++ b/src/pdf/SkPDFGraphicState.cpp
@@ -210,17 +210,17 @@ void SkPDFGraphicState::emitObject(
SkPaint::Join strokeJoin = (SkPaint::Join)fStrokeJoin;
SkXfermode::Mode xferMode = (SkXfermode::Mode)fMode;
- SK_COMPILE_ASSERT(SkPaint::kButt_Cap == 0, paint_cap_mismatch);
- SK_COMPILE_ASSERT(SkPaint::kRound_Cap == 1, paint_cap_mismatch);
- SK_COMPILE_ASSERT(SkPaint::kSquare_Cap == 2, paint_cap_mismatch);
- SK_COMPILE_ASSERT(SkPaint::kCapCount == 3, paint_cap_mismatch);
+ static_assert(SkPaint::kButt_Cap == 0, "paint_cap_mismatch");
+ static_assert(SkPaint::kRound_Cap == 1, "paint_cap_mismatch");
+ static_assert(SkPaint::kSquare_Cap == 2, "paint_cap_mismatch");
+ static_assert(SkPaint::kCapCount == 3, "paint_cap_mismatch");
SkASSERT(strokeCap >= 0 && strokeCap <= 2);
dict->insertInt("LC", strokeCap);
- SK_COMPILE_ASSERT(SkPaint::kMiter_Join == 0, paint_join_mismatch);
- SK_COMPILE_ASSERT(SkPaint::kRound_Join == 1, paint_join_mismatch);
- SK_COMPILE_ASSERT(SkPaint::kBevel_Join == 2, paint_join_mismatch);
- SK_COMPILE_ASSERT(SkPaint::kJoinCount == 3, paint_join_mismatch);
+ static_assert(SkPaint::kMiter_Join == 0, "paint_join_mismatch");
+ static_assert(SkPaint::kRound_Join == 1, "paint_join_mismatch");
+ static_assert(SkPaint::kBevel_Join == 2, "paint_join_mismatch");
+ static_assert(SkPaint::kJoinCount == 3, "paint_join_mismatch");
SkASSERT(strokeJoin >= 0 && strokeJoin <= 2);
dict->insertInt("LJ", strokeJoin);
« no previous file with comments | « src/pdf/SkPDFFont.cpp ('k') | src/pdf/SkPDFResourceDict.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698