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 /include/gpu | |
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 'include/gpu')
-rw-r--r-- | include/gpu/GrTypes.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/gpu/GrTypes.h b/include/gpu/GrTypes.h index f516388874..ed4827d627 100644 --- a/include/gpu/GrTypes.h +++ b/include/gpu/GrTypes.h @@ -185,10 +185,10 @@ static inline int GrMaskFormatBytesPerPixel(GrMaskFormat format) { // kA565 (1) -> 2 // kARGB (2) -> 4 static const int sBytesPerPixel[] = { 1, 2, 4 }; - SK_COMPILE_ASSERT(SK_ARRAY_COUNT(sBytesPerPixel) == kMaskFormatCount, array_size_mismatch); - SK_COMPILE_ASSERT(kA8_GrMaskFormat == 0, enum_order_dependency); - SK_COMPILE_ASSERT(kA565_GrMaskFormat == 1, enum_order_dependency); - SK_COMPILE_ASSERT(kARGB_GrMaskFormat == 2, enum_order_dependency); + static_assert(SK_ARRAY_COUNT(sBytesPerPixel) == kMaskFormatCount, "array_size_mismatch"); + static_assert(kA8_GrMaskFormat == 0, "enum_order_dependency"); + static_assert(kA565_GrMaskFormat == 1, "enum_order_dependency"); + static_assert(kARGB_GrMaskFormat == 2, "enum_order_dependency"); return sBytesPerPixel[(int) format]; } |