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

Unified Diff: net/quic/crypto/curve25519_key_exchange.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/crypto_server_test.cc ('k') | net/quic/crypto/quic_crypto_client_config.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/crypto/curve25519_key_exchange.cc
diff --git a/net/quic/crypto/curve25519_key_exchange.cc b/net/quic/crypto/curve25519_key_exchange.cc
index 88eb0537763d956ae2b048bb8aee9f99dcb56c64..f3d39e76001151853654a87316ea47ff72d3cdb9 100644
--- a/net/quic/crypto/curve25519_key_exchange.cc
+++ b/net/quic/crypto/curve25519_key_exchange.cc
@@ -25,11 +25,10 @@ Curve25519KeyExchange* Curve25519KeyExchange::New(
// We don't want to #include the NaCl headers in the public header file, so
// we use literals for the sizes of private_key_ and public_key_. Here we
// assert that those values are equal to the values from the NaCl header.
- COMPILE_ASSERT(
- sizeof(ka->private_key_) == crypto::curve25519::kScalarBytes,
- header_out_of_sync);
- COMPILE_ASSERT(sizeof(ka->public_key_) == crypto::curve25519::kBytes,
- header_out_of_sync);
+ static_assert(sizeof(ka->private_key_) == crypto::curve25519::kScalarBytes,
+ "header out of sync");
+ static_assert(sizeof(ka->public_key_) == crypto::curve25519::kBytes,
+ "header out of sync");
if (private_key.size() != crypto::curve25519::kScalarBytes) {
return nullptr;
« no previous file with comments | « net/quic/crypto/crypto_server_test.cc ('k') | net/quic/crypto/quic_crypto_client_config.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698