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

Unified Diff: Source/platform/exported/WebCryptoAlgorithm.cpp

Issue 813883002: replace COMPILE_ASSERT with static_assert in platform/ (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: final fixups 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 | « Source/platform/animation/AnimationUtilities.h ('k') | Source/platform/fonts/FontDescription.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/exported/WebCryptoAlgorithm.cpp
diff --git a/Source/platform/exported/WebCryptoAlgorithm.cpp b/Source/platform/exported/WebCryptoAlgorithm.cpp
index f7d471cf0b830c14a84acf9f7c1de6a6fa366bd2..35b1e0ac28a58c6093b3ce662be919c17a547d50 100644
--- a/Source/platform/exported/WebCryptoAlgorithm.cpp
+++ b/Source/platform/exported/WebCryptoAlgorithm.cpp
@@ -245,22 +245,22 @@ const WebCryptoAlgorithmInfo algorithmIdToInfo[] = {
// Initializing the algorithmIdToInfo table above depends on knowing the enum
// values for algorithm IDs. If those ever change, the table will need to be
// updated.
-COMPILE_ASSERT(WebCryptoAlgorithmIdAesCbc == 0, AesCbc_idDoesntMatch);
-COMPILE_ASSERT(WebCryptoAlgorithmIdHmac == 1, Hmac_idDoesntMatch);
-COMPILE_ASSERT(WebCryptoAlgorithmIdRsaSsaPkcs1v1_5 == 2, RsaSsaPkcs1v1_5_idDoesntMatch);
-COMPILE_ASSERT(WebCryptoAlgorithmIdSha1 == 3, Sha1_idDoesntMatch);
-COMPILE_ASSERT(WebCryptoAlgorithmIdSha256 == 4, Sha256_idDoesntMatch);
-COMPILE_ASSERT(WebCryptoAlgorithmIdSha384 == 5, Sha384_idDoesntMatch);
-COMPILE_ASSERT(WebCryptoAlgorithmIdSha512 == 6, Sha512_idDoesntMatch);
-COMPILE_ASSERT(WebCryptoAlgorithmIdAesGcm == 7, AesGcm_idDoesntMatch);
-COMPILE_ASSERT(WebCryptoAlgorithmIdRsaOaep == 8, RsaOaep_idDoesntMatch);
-COMPILE_ASSERT(WebCryptoAlgorithmIdAesCtr == 9, AesCtr_idDoesntMatch);
-COMPILE_ASSERT(WebCryptoAlgorithmIdAesKw == 10, AesKw_idDoesntMatch);
-COMPILE_ASSERT(WebCryptoAlgorithmIdRsaPss == 11, RsaPss_idDoesntMatch);
-COMPILE_ASSERT(WebCryptoAlgorithmIdEcdsa == 12, Ecdsa_idDoesntMatch);
-COMPILE_ASSERT(WebCryptoAlgorithmIdEcdh == 13, Ecdh_idDoesntMatch);
-COMPILE_ASSERT(WebCryptoAlgorithmIdLast == 13, Last_idDoesntMatch);
-COMPILE_ASSERT(10 == WebCryptoOperationLast, UpdateParamsMapping);
+static_assert(WebCryptoAlgorithmIdAesCbc == 0, "AES CBC id must match");
+static_assert(WebCryptoAlgorithmIdHmac == 1, "HMAC id must match");
+static_assert(WebCryptoAlgorithmIdRsaSsaPkcs1v1_5 == 2, "RSASSA-PKCS1-v1_5 id must match");
+static_assert(WebCryptoAlgorithmIdSha1 == 3, "SHA1 id must match");
+static_assert(WebCryptoAlgorithmIdSha256 == 4, "SHA256 id must match");
+static_assert(WebCryptoAlgorithmIdSha384 == 5, "SHA384 id must match");
+static_assert(WebCryptoAlgorithmIdSha512 == 6, "SHA512 id must match");
+static_assert(WebCryptoAlgorithmIdAesGcm == 7, "AES GCM id must match");
+static_assert(WebCryptoAlgorithmIdRsaOaep == 8, "RSA OAEP id must match");
+static_assert(WebCryptoAlgorithmIdAesCtr == 9, "AES CTR id must match");
+static_assert(WebCryptoAlgorithmIdAesKw == 10, "AESKW id must match");
+static_assert(WebCryptoAlgorithmIdRsaPss == 11, "RSA-PSS id must match");
+static_assert(WebCryptoAlgorithmIdEcdsa == 12, "ECDSA id must match");
+static_assert(WebCryptoAlgorithmIdEcdh == 13, "ECDH id must match");
+static_assert(WebCryptoAlgorithmIdLast == 13, "last id must match");
+static_assert(10 == WebCryptoOperationLast, "the parameter mapping needs to be updated");
} // namespace
« no previous file with comments | « Source/platform/animation/AnimationUtilities.h ('k') | Source/platform/fonts/FontDescription.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698