Chromium Code Reviews

Unified Diff: cc/animation/animation.cc

Issue 804373004: replace COMPILE_ASSERT with static_assert in cc/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « no previous file | cc/base/util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/animation/animation.cc
diff --git a/cc/animation/animation.cc b/cc/animation/animation.cc
index f5abfa0febd45e6bebdd4a92e290f5bf21a9b97c..da435eb7bda5fa4ad64047f0ccd69cfaaf953755 100644
--- a/cc/animation/animation.cc
+++ b/cc/animation/animation.cc
@@ -24,9 +24,10 @@ static const char* const s_runStateNames[] = {
"Aborted"
};
-COMPILE_ASSERT(static_cast<int>(cc::Animation::RunStateEnumSize) ==
- arraysize(s_runStateNames),
- RunState_names_match_enum);
+static_assert(static_cast<int>(cc::Animation::RunStateEnumSize) ==
+ arraysize(s_runStateNames),
+ "RunStateEnumSize should equal the number of elements in "
+ "s_runStateNames");
// This should match the TargetProperty enum.
static const char* const s_targetPropertyNames[] = {
@@ -37,9 +38,10 @@ static const char* const s_targetPropertyNames[] = {
"BackgroundColor"
};
-COMPILE_ASSERT(static_cast<int>(cc::Animation::TargetPropertyEnumSize) ==
- arraysize(s_targetPropertyNames),
- TargetProperty_names_match_enum);
+static_assert(static_cast<int>(cc::Animation::TargetPropertyEnumSize) ==
+ arraysize(s_targetPropertyNames),
+ "TargetPropertyEnumSize should equal the number of elements in "
+ "s_targetPropertyNames");
} // namespace
« no previous file with comments | « no previous file | cc/base/util.h » ('j') | no next file with comments »

Powered by Google App Engine