Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1429)

Unified Diff: content/child/assert_matching_enums.cc

Issue 791923003: replace COMPILE_ASSERT with static_assert in content/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixups Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/web_contents/web_contents_view_mac.mm ('k') | content/child/blink_platform_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/assert_matching_enums.cc
diff --git a/content/child/assert_matching_enums.cc b/content/child/assert_matching_enums.cc
index 89ff842d4834a2c5734f0e86bc3b265d7abe3af4..33a4fbde08e3eb73706b0e82de7041375d598a8a 100644
--- a/content/child/assert_matching_enums.cc
+++ b/content/child/assert_matching_enums.cc
@@ -15,48 +15,48 @@
namespace content {
-#define COMPILE_ASSERT_MATCHING_ENUM(expected, actual) \
- COMPILE_ASSERT(int(expected) == int(actual), mismatching_enums)
+#define STATIC_ASSERT_MATCHING_ENUM(expected, actual) \
+ static_assert(int(expected) == int(actual), "mismatching enums: " #expected)
// ScreenOrientationValues
-COMPILE_ASSERT_MATCHING_ENUM(blink::WebScreenOrientationLockDefault,
+STATIC_ASSERT_MATCHING_ENUM(blink::WebScreenOrientationLockDefault,
SCREEN_ORIENTATION_VALUES_DEFAULT);
-COMPILE_ASSERT_MATCHING_ENUM(blink::WebScreenOrientationLockPortraitPrimary,
+STATIC_ASSERT_MATCHING_ENUM(blink::WebScreenOrientationLockPortraitPrimary,
SCREEN_ORIENTATION_VALUES_PORTRAIT_PRIMARY);
-COMPILE_ASSERT_MATCHING_ENUM(blink::WebScreenOrientationLockPortraitSecondary,
+STATIC_ASSERT_MATCHING_ENUM(blink::WebScreenOrientationLockPortraitSecondary,
SCREEN_ORIENTATION_VALUES_PORTRAIT_SECONDARY);
-COMPILE_ASSERT_MATCHING_ENUM(blink::WebScreenOrientationLockLandscapePrimary,
+STATIC_ASSERT_MATCHING_ENUM(blink::WebScreenOrientationLockLandscapePrimary,
SCREEN_ORIENTATION_VALUES_LANDSCAPE_PRIMARY);
-COMPILE_ASSERT_MATCHING_ENUM(blink::WebScreenOrientationLockLandscapeSecondary,
+STATIC_ASSERT_MATCHING_ENUM(blink::WebScreenOrientationLockLandscapeSecondary,
SCREEN_ORIENTATION_VALUES_LANDSCAPE_SECONDARY);
-COMPILE_ASSERT_MATCHING_ENUM(blink::WebScreenOrientationLockAny,
+STATIC_ASSERT_MATCHING_ENUM(blink::WebScreenOrientationLockAny,
SCREEN_ORIENTATION_VALUES_ANY);
-COMPILE_ASSERT_MATCHING_ENUM(blink::WebScreenOrientationLockLandscape,
+STATIC_ASSERT_MATCHING_ENUM(blink::WebScreenOrientationLockLandscape,
SCREEN_ORIENTATION_VALUES_LANDSCAPE);
-COMPILE_ASSERT_MATCHING_ENUM(blink::WebScreenOrientationLockPortrait,
+STATIC_ASSERT_MATCHING_ENUM(blink::WebScreenOrientationLockPortrait,
SCREEN_ORIENTATION_VALUES_PORTRAIT);
-COMPILE_ASSERT_MATCHING_ENUM(blink::WebScreenOrientationLockNatural,
+STATIC_ASSERT_MATCHING_ENUM(blink::WebScreenOrientationLockNatural,
SCREEN_ORIENTATION_VALUES_NATURAL);
// SupportsType
-COMPILE_ASSERT_MATCHING_ENUM(blink::WebMimeRegistry::IsNotSupported,
+STATIC_ASSERT_MATCHING_ENUM(blink::WebMimeRegistry::IsNotSupported,
net::IsNotSupported);
-COMPILE_ASSERT_MATCHING_ENUM(blink::WebMimeRegistry::IsSupported,
+STATIC_ASSERT_MATCHING_ENUM(blink::WebMimeRegistry::IsSupported,
net::IsSupported);
-COMPILE_ASSERT_MATCHING_ENUM(blink::WebMimeRegistry::MayBeSupported,
+STATIC_ASSERT_MATCHING_ENUM(blink::WebMimeRegistry::MayBeSupported,
net::MayBeSupported);
// TargetProperty
-COMPILE_ASSERT_MATCHING_ENUM(
+STATIC_ASSERT_MATCHING_ENUM(
blink::WebCompositorAnimation::TargetPropertyTransform,
cc::Animation::Transform);
-COMPILE_ASSERT_MATCHING_ENUM(
+STATIC_ASSERT_MATCHING_ENUM(
blink::WebCompositorAnimation::TargetPropertyOpacity,
cc::Animation::Opacity);
-COMPILE_ASSERT_MATCHING_ENUM(
+STATIC_ASSERT_MATCHING_ENUM(
blink::WebCompositorAnimation::TargetPropertyFilter,
cc::Animation::Filter);
-COMPILE_ASSERT_MATCHING_ENUM(
+STATIC_ASSERT_MATCHING_ENUM(
blink::WebCompositorAnimation::TargetPropertyScrollOffset,
cc::Animation::ScrollOffset);
« no previous file with comments | « content/browser/web_contents/web_contents_view_mac.mm ('k') | content/child/blink_platform_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698