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

Unified Diff: base/metrics/field_trial.cc

Issue 1467003002: Switch to static_assert in base/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: / Created 5 years, 1 month 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 | « base/message_loop/message_loop.h ('k') | base/observer_list_threadsafe.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/metrics/field_trial.cc
diff --git a/base/metrics/field_trial.cc b/base/metrics/field_trial.cc
index 2ad7517a4bd59e22d0247c8d03c169b014b25829..e9e3be245702561fc7fdf31e74dae74085c9fea3 100644
--- a/base/metrics/field_trial.cc
+++ b/base/metrics/field_trial.cc
@@ -325,12 +325,11 @@ FieldTrial* FieldTrialList::FactoryGetFieldTrialWithRandomizationSeed(
// group number, so that it does not conflict with the |AppendGroup()|
// result for the chosen group.
const int kNonConflictingGroupNumber = -2;
- COMPILE_ASSERT(
+ static_assert(
kNonConflictingGroupNumber != FieldTrial::kDefaultGroupNumber,
- conflicting_default_group_number);
- COMPILE_ASSERT(
- kNonConflictingGroupNumber != FieldTrial::kNotFinalized,
- conflicting_default_group_number);
+ "The 'non-conflicting' group number conflicts");
+ static_assert(kNonConflictingGroupNumber != FieldTrial::kNotFinalized,
+ "The 'non-conflicting' group number conflicts");
*default_group_number = kNonConflictingGroupNumber;
}
}
« no previous file with comments | « base/message_loop/message_loop.h ('k') | base/observer_list_threadsafe.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698