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

Unified Diff: sync/protocol/proto_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/internal_api/public/base/ordinal_unittest.cc ('k') | sync/syncable/model_type.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/protocol/proto_enum_conversions.cc
diff --git a/sync/protocol/proto_enum_conversions.cc b/sync/protocol/proto_enum_conversions.cc
index eff952fe0f5c4b9998a26daa709b43131cae7dee..e53153347f2ec8a7abb885d71911bec450b3ba5f 100644
--- a/sync/protocol/proto_enum_conversions.cc
+++ b/sync/protocol/proto_enum_conversions.cc
@@ -11,11 +11,11 @@
namespace syncer {
-#define ASSERT_ENUM_BOUNDS(enum_parent, enum_type, enum_min, enum_max) \
- COMPILE_ASSERT(enum_parent::enum_type##_MIN == enum_parent::enum_min, \
- enum_type##_MIN_not_##enum_min); \
- COMPILE_ASSERT(enum_parent::enum_type##_MAX == enum_parent::enum_max, \
- enum_type##_MAX_not_##enum_max);
+#define ASSERT_ENUM_BOUNDS(enum_parent, enum_type, enum_min, enum_max) \
+ static_assert(enum_parent::enum_type##_MIN == enum_parent::enum_min, \
+ #enum_type "_MIN should be " #enum_min); \
+ static_assert(enum_parent::enum_type##_MAX == enum_parent::enum_max, \
+ #enum_type "_MAX should be " #enum_max);
#define ENUM_CASE(enum_parent, enum_value) \
case enum_parent::enum_value: return #enum_value
« no previous file with comments | « sync/internal_api/public/base/ordinal_unittest.cc ('k') | sync/syncable/model_type.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698