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

Unified Diff: components/sync_driver/model_association_manager.cc

Issue 794683005: replace COMPILE_ASSERT with static_assert in components/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: formatting fixup Created 6 years 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
Index: components/sync_driver/model_association_manager.cc
diff --git a/components/sync_driver/model_association_manager.cc b/components/sync_driver/model_association_manager.cc
index 88c5a965eedeecf1c2cce8b98e14855ba9083009..1b2c09bce5d1c032d429d57b6348ec8f360d8237 100644
--- a/components/sync_driver/model_association_manager.cc
+++ b/components/sync_driver/model_association_manager.cc
@@ -61,9 +61,10 @@ static const syncer::ModelType kStartOrder[] = {
syncer::WIFI_CREDENTIALS,
};
-COMPILE_ASSERT(arraysize(kStartOrder) ==
- syncer::MODEL_TYPE_COUNT - syncer::FIRST_REAL_MODEL_TYPE,
- kStartOrder_IncorrectSize);
+static_assert(arraysize(kStartOrder) ==
+ syncer::MODEL_TYPE_COUNT - syncer::FIRST_REAL_MODEL_TYPE,
+ "kStartOrder must have MODEL_TYPE_COUNT - "
+ "FIRST_REAL_MODEL_TYPE elements");
// The amount of time we wait for association to finish. If some types haven't
// finished association by the time, DataTypeManager is notified of the

Powered by Google App Engine
This is Rietveld 408576698