summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--skia/ext/benchmarking_canvas.cc12
-rw-r--r--skia/ext/skia_utils_win.cc18
-rw-r--r--skia/ext/skia_utils_win.h4
3 files changed, 17 insertions, 17 deletions
diff --git a/skia/ext/benchmarking_canvas.cc b/skia/ext/benchmarking_canvas.cc
index added95..752e398 100644
--- a/skia/ext/benchmarking_canvas.cc
+++ b/skia/ext/benchmarking_canvas.cc
@@ -355,15 +355,15 @@ scoped_ptr<base::Value> AsValue(const SkPath& path) {
{ "move", "line", "quad", "conic", "cubic", "close", "done" };
static const int gPtsPerVerb[] = { 1, 1, 2, 2, 3, 0, 0 };
static const int gPtOffsetPerVerb[] = { 0, 1, 1, 1, 1, 0, 0 };
- SK_COMPILE_ASSERT(
+ static_assert(
SK_ARRAY_COUNT(gVerbStrings) == static_cast<size_t>(SkPath::kDone_Verb + 1),
- gVerbStrings_size_mismatch);
- SK_COMPILE_ASSERT(
+ "gVerbStrings size mismatch");
+ static_assert(
SK_ARRAY_COUNT(gVerbStrings) == SK_ARRAY_COUNT(gPtsPerVerb),
- gPtsPerVerb_size_mismatch);
- SK_COMPILE_ASSERT(
+ "gPtsPerVerb size mismatch");
+ static_assert(
SK_ARRAY_COUNT(gVerbStrings) == SK_ARRAY_COUNT(gPtOffsetPerVerb),
- gPtOffsetPerVerb_size_mismatch);
+ "gPtOffsetPerVerb size mismatch");
scoped_ptr<base::ListValue> verbs_val(new base::ListValue());
SkPath::Iter iter(const_cast<SkPath&>(path), false);
diff --git a/skia/ext/skia_utils_win.cc b/skia/ext/skia_utils_win.cc
index e065b1e..3089b24 100644
--- a/skia/ext/skia_utils_win.cc
+++ b/skia/ext/skia_utils_win.cc
@@ -13,15 +13,15 @@
namespace {
-SK_COMPILE_ASSERT(offsetof(RECT, left) == offsetof(SkIRect, fLeft), o1);
-SK_COMPILE_ASSERT(offsetof(RECT, top) == offsetof(SkIRect, fTop), o2);
-SK_COMPILE_ASSERT(offsetof(RECT, right) == offsetof(SkIRect, fRight), o3);
-SK_COMPILE_ASSERT(offsetof(RECT, bottom) == offsetof(SkIRect, fBottom), o4);
-SK_COMPILE_ASSERT(sizeof(RECT().left) == sizeof(SkIRect().fLeft), o5);
-SK_COMPILE_ASSERT(sizeof(RECT().top) == sizeof(SkIRect().fTop), o6);
-SK_COMPILE_ASSERT(sizeof(RECT().right) == sizeof(SkIRect().fRight), o7);
-SK_COMPILE_ASSERT(sizeof(RECT().bottom) == sizeof(SkIRect().fBottom), o8);
-SK_COMPILE_ASSERT(sizeof(RECT) == sizeof(SkIRect), o9);
+static_assert(offsetof(RECT, left) == offsetof(SkIRect, fLeft), "o1");
+static_assert(offsetof(RECT, top) == offsetof(SkIRect, fTop), "o2");
+static_assert(offsetof(RECT, right) == offsetof(SkIRect, fRight), "o3");
+static_assert(offsetof(RECT, bottom) == offsetof(SkIRect, fBottom), "o4");
+static_assert(sizeof(RECT().left) == sizeof(SkIRect().fLeft), "o5");
+static_assert(sizeof(RECT().top) == sizeof(SkIRect().fTop), "o6");
+static_assert(sizeof(RECT().right) == sizeof(SkIRect().fRight), "o7");
+static_assert(sizeof(RECT().bottom) == sizeof(SkIRect().fBottom), "o8");
+static_assert(sizeof(RECT) == sizeof(SkIRect), "o9");
} // namespace
diff --git a/skia/ext/skia_utils_win.h b/skia/ext/skia_utils_win.h
index 6ac5234..379cba12 100644
--- a/skia/ext/skia_utils_win.h
+++ b/skia/ext/skia_utils_win.h
@@ -24,14 +24,14 @@ POINT SkPointToPOINT(const SkPoint& point);
SkRect RECTToSkRect(const RECT& rect);
// Converts a Windows RECT to a Skia rect.
-// Both use same in-memory format. Verified by SK_COMPILE_ASSERT() in
+// Both use same in-memory format. Verified by static_assert in
// skia_utils_win.cc.
inline const SkIRect& RECTToSkIRect(const RECT& rect) {
return reinterpret_cast<const SkIRect&>(rect);
}
// Converts a Skia rect to a Windows RECT.
-// Both use same in-memory format. Verified by SK_COMPILE_ASSERT() in
+// Both use same in-memory format. Verified by static_assert in
// skia_utils_win.cc.
inline const RECT& SkIRectToRECT(const SkIRect& rect) {
return reinterpret_cast<const RECT&>(rect);