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

Unified Diff: net/quic/port_suggester.cc

Issue 826973002: replace COMPILE_ASSERT with static_assert in net/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: apply fixups Created 5 years, 11 months 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 | « net/quic/crypto/quic_crypto_server_config.cc ('k') | net/socket/client_socket_pool_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/port_suggester.cc
diff --git a/net/quic/port_suggester.cc b/net/quic/port_suggester.cc
index 6b7940e83efae21a49750ded5b579d151196d71b..b1dfa484fd54258328fc5b462cf1aadb589f4f88 100644
--- a/net/quic/port_suggester.cc
+++ b/net/quic/port_suggester.cc
@@ -16,7 +16,7 @@ PortSuggester::PortSuggester(const HostPortPair& server, uint64 seed)
base::SHA1HashBytes(
reinterpret_cast<const unsigned char*>(server.host().data()),
server.host().length(), hash_bytes);
- COMPILE_ASSERT(sizeof(seed_) < sizeof(hash_bytes), seed_larger_than_hash);
+ static_assert(sizeof(seed_) < sizeof(hash_bytes), "seed larger than hash");
memcpy(&seed_, hash_bytes, sizeof(seed_));
seed_ ^= seed ^ server.port();
}
« no previous file with comments | « net/quic/crypto/quic_crypto_server_config.cc ('k') | net/socket/client_socket_pool_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698