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

Unified Diff: sync/syncable/syncable_enum_conversions.cc

Issue 809073005: replace COMPILE_ASSERT with static_assert in sync/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix nit 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 | « sync/syncable/syncable_columns.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/syncable/syncable_enum_conversions.cc
diff --git a/sync/syncable/syncable_enum_conversions.cc b/sync/syncable/syncable_enum_conversions.cc
index 7e0a8c984bee5fd61f946bed3a34146df9cf3413..b98500f8223a082bc1df19b4f8ff3e9802fa4bde 100644
--- a/sync/syncable/syncable_enum_conversions.cc
+++ b/sync/syncable/syncable_enum_conversions.cc
@@ -15,12 +15,12 @@ namespace syncable {
// We can't tokenize expected_min/expected_max since it can be a
// general expression.
#define ASSERT_ENUM_BOUNDS(enum_min, enum_max, expected_min, expected_max) \
- COMPILE_ASSERT(static_cast<int>(enum_min) == \
- static_cast<int>(expected_min), \
- enum_min##_not_expected_min); \
- COMPILE_ASSERT(static_cast<int>(enum_max) == \
- static_cast<int>(expected_max), \
- enum_max##_not_expected_max);
+ static_assert(static_cast<int>(enum_min) == \
+ static_cast<int>(expected_min), \
+ #enum_min " not " #expected_min); \
+ static_assert(static_cast<int>(enum_max) == \
+ static_cast<int>(expected_max), \
+ #enum_max " not " #expected_max);
#define ENUM_CASE(enum_value) case enum_value: return #enum_value
« no previous file with comments | « sync/syncable/syncable_columns.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698