diff options
author | mostynb <mostynb@opera.com> | 2015-01-05 17:27:52 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-01-06 01:28:42 +0000 |
commit | c17d133b74e5c53ae4a7bec73fc46e208702164e (patch) | |
tree | 71075a4d3080154ebcf1e8ed04757824706f1ca6 /skia/ext | |
parent | 2912825c21cfa37f326f81cb8c8abd9979262830 (diff) | |
download | chromium_src-c17d133b74e5c53ae4a7bec73fc46e208702164e.zip chromium_src-c17d133b74e5c53ae4a7bec73fc46e208702164e.tar.gz chromium_src-c17d133b74e5c53ae4a7bec73fc46e208702164e.tar.bz2 |
replace COMPILE_ASSERT with static_assert in skia/
BUG=442514
Review URL: https://codereview.chromium.org/823403002
Cr-Commit-Position: refs/heads/master@{#310027}
Diffstat (limited to 'skia/ext')
-rw-r--r-- | skia/ext/convolver.h | 3 | ||||
-rw-r--r-- | skia/ext/skia_utils_win.h | 8 |
2 files changed, 6 insertions, 5 deletions
diff --git a/skia/ext/convolver.h b/skia/ext/convolver.h index ace8c21..1f61f23 100644 --- a/skia/ext/convolver.h +++ b/skia/ext/convolver.h @@ -60,7 +60,8 @@ class ConvolutionFilter1D { // The cast relies on Fixed being a short, implying that on // the platforms we care about all (16) bits will fit into // the mantissa of a (32-bit) float. - COMPILE_ASSERT(sizeof(Fixed) == 2, fixed_type_should_fit_in_float_mantissa); + static_assert(sizeof(Fixed) == 2, + "fixed type should fit in float mantissa"); float raw = static_cast<float>(x); return ldexpf(raw, -kShiftBits); } diff --git a/skia/ext/skia_utils_win.h b/skia/ext/skia_utils_win.h index 98e1b99..6ac5234 100644 --- a/skia/ext/skia_utils_win.h +++ b/skia/ext/skia_utils_win.h @@ -24,15 +24,15 @@ 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 COMPILE_ASSERT() in -// skia_utils.cc. +// Both use same in-memory format. Verified by SK_COMPILE_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 COMPILE_ASSERT() in -// skia_utils.cc. +// Both use same in-memory format. Verified by SK_COMPILE_ASSERT() in +// skia_utils_win.cc. inline const RECT& SkIRectToRECT(const SkIRect& rect) { return reinterpret_cast<const RECT&>(rect); } |