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

Unified Diff: chrome/browser/profile_resetter/resettable_settings_snapshot.cc

Issue 815363002: replace COMPILE_ASSERT with static_assert in chrome/browser/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments 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: chrome/browser/profile_resetter/resettable_settings_snapshot.cc
diff --git a/chrome/browser/profile_resetter/resettable_settings_snapshot.cc b/chrome/browser/profile_resetter/resettable_settings_snapshot.cc
index fb58ee387c38371b040a0c301e3596e60d43dfe2..336a8a7e2cdde9c4426986b0abd7d471af9ab4e7 100644
--- a/chrome/browser/profile_resetter/resettable_settings_snapshot.cc
+++ b/chrome/browser/profile_resetter/resettable_settings_snapshot.cc
@@ -126,8 +126,8 @@ int ResettableSettingsSnapshot::FindDifferentFields(
if (shortcuts_ != snapshot.shortcuts_)
bit_mask |= SHORTCUTS;
- COMPILE_ASSERT(ResettableSettingsSnapshot::ALL_FIELDS == 31,
- add_new_field_here);
+ static_assert(ResettableSettingsSnapshot::ALL_FIELDS == 31,
+ "new field needs to be added here");
return bit_mask;
}
@@ -211,8 +211,8 @@ std::string SerializeSettingsReport(const ResettableSettingsSnapshot& snapshot,
dict.Set(kShortcuts, list);
}
- COMPILE_ASSERT(ResettableSettingsSnapshot::ALL_FIELDS == 31,
- serialize_new_field_here);
+ static_assert(ResettableSettingsSnapshot::ALL_FIELDS == 31,
+ "new field needs to be serialized here");
std::string json;
base::JSONWriter::Write(&dict, &json);

Powered by Google App Engine
This is Rietveld 408576698