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

Unified Diff: chrome/browser/prerender/prerender_local_predictor.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
« no previous file with comments | « chrome/browser/prerender/prerender_link_manager.cc ('k') | chrome/browser/prerender/prerender_origin.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/prerender/prerender_local_predictor.cc
diff --git a/chrome/browser/prerender/prerender_local_predictor.cc b/chrome/browser/prerender/prerender_local_predictor.cc
index 3516d95718f44b5852d67c7bb9a6a5cfc51cdc69..1da0f045386930cfa88b8d8052fef4b1af3c3a81 100644
--- a/chrome/browser/prerender/prerender_local_predictor.cc
+++ b/chrome/browser/prerender/prerender_local_predictor.cc
@@ -307,14 +307,14 @@ bool IsLogOutURL(const GURL& url) {
}
int64 URLHashToInt64(const unsigned char* data) {
- COMPILE_ASSERT(kURLHashSize < sizeof(int64), url_hash_must_fit_in_int64);
+ static_assert(kURLHashSize < sizeof(int64), "url hash must fit in int64");
int64 value = 0;
memcpy(&value, data, kURLHashSize);
return value;
}
int64 GetInt64URLHashForURL(const GURL& url) {
- COMPILE_ASSERT(kURLHashSize < sizeof(int64), url_hash_must_fit_in_int64);
+ static_assert(kURLHashSize < sizeof(int64), "url hash must fit in int64");
scoped_ptr<crypto::SecureHash> hash(
crypto::SecureHash::Create(crypto::SecureHash::SHA256));
int64 hash_value = 0;
« no previous file with comments | « chrome/browser/prerender/prerender_link_manager.cc ('k') | chrome/browser/prerender/prerender_origin.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698