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

Unified Diff: components/variations/entropy_provider.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/user_manager/user.cc ('k') | components/variations/metrics_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/variations/entropy_provider.cc
diff --git a/components/variations/entropy_provider.cc b/components/variations/entropy_provider.cc
index 6e2501f98259a2c035d578d3d3657d2ad2ee58b9..73583409ee138ba6d3c2426eb1629f48496244b1 100644
--- a/components/variations/entropy_provider.cc
+++ b/components/variations/entropy_provider.cc
@@ -94,7 +94,7 @@ double SHA1EntropyProvider::GetEntropyForTrial(
sha1_hash);
uint64 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));
bits = base::ByteSwapToLE64(bits);
« no previous file with comments | « components/user_manager/user.cc ('k') | components/variations/metrics_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698