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

Unified Diff: components/variations/metrics_util.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
« no previous file with comments | « components/variations/entropy_provider.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/variations/metrics_util.cc
diff --git a/components/variations/metrics_util.cc b/components/variations/metrics_util.cc
index 031c3d37a31311794a33aef7bc09497a0e0fa5f3..41b2df3854a94866994fd723cfeb78e014346b66 100644
--- a/components/variations/metrics_util.cc
+++ b/components/variations/metrics_util.cc
@@ -18,7 +18,7 @@ uint32 HashName(const std::string& name) {
sha1_hash);
uint32 bits;
- COMPILE_ASSERT(sizeof(bits) < sizeof(sha1_hash), need_more_data);
+ static_assert(sizeof(bits) < sizeof(sha1_hash), "more data required");
memcpy(&bits, sha1_hash, sizeof(bits));
return base::ByteSwapToLE32(bits);
« no previous file with comments | « components/variations/entropy_provider.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698