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

Unified Diff: net/quic/crypto/chacha20_poly1305_decrypter_openssl.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
Index: net/quic/crypto/chacha20_poly1305_decrypter_openssl.cc
diff --git a/net/quic/crypto/chacha20_poly1305_decrypter_openssl.cc b/net/quic/crypto/chacha20_poly1305_decrypter_openssl.cc
index 7f0e24da704315d64f9b06be103b627975f94a82..cbf96e91792f904ce19f414d69a2440371c06537 100644
--- a/net/quic/crypto/chacha20_poly1305_decrypter_openssl.cc
+++ b/net/quic/crypto/chacha20_poly1305_decrypter_openssl.cc
@@ -18,9 +18,9 @@ const size_t kNoncePrefixSize = 0;
ChaCha20Poly1305Decrypter::ChaCha20Poly1305Decrypter()
: AeadBaseDecrypter(EVP_aead_chacha20_poly1305(), kKeySize, kAuthTagSize,
kNoncePrefixSize) {
- COMPILE_ASSERT(kKeySize <= kMaxKeySize, key_size_too_big);
- COMPILE_ASSERT(kNoncePrefixSize <= kMaxNoncePrefixSize,
- nonce_prefix_size_too_big);
+ static_assert(kKeySize <= kMaxKeySize, "key size too big");
+ static_assert(kNoncePrefixSize <= kMaxNoncePrefixSize,
+ "nonce prefix size too big");
}
ChaCha20Poly1305Decrypter::~ChaCha20Poly1305Decrypter() {}
« no previous file with comments | « net/quic/crypto/chacha20_poly1305_decrypter_nss.cc ('k') | net/quic/crypto/chacha20_poly1305_encrypter_nss.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698