aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/gpu/GrTypes.h
diff options
context:
space:
mode:
authorGravatar bungeman <bungeman@google.com>2015-08-20 07:57:51 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-08-20 07:57:52 -0700
commit99fe82260633fcf5d92cca38d12ef0937ecca61c (patch)
tree258dedccd2b908de58f6b1ae7c67dbfbe7208866 /include/gpu/GrTypes.h
parent915881fe743f9a789037695f543bc6ea189cd0cb (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/GrTypes.h')
-rw-r--r--include/gpu/GrTypes.h8
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];
}