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

Unified Diff: chrome/browser/extensions/api/proxy/proxy_api_constants.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
Index: chrome/browser/extensions/api/proxy/proxy_api_constants.cc
diff --git a/chrome/browser/extensions/api/proxy/proxy_api_constants.cc b/chrome/browser/extensions/api/proxy/proxy_api_constants.cc
index 3142b2f75894135d58fa95c8b31c228fa0b91c16..0c1ee3aa7b86fd2d16b947e2b0886268e275e06e 100644
--- a/chrome/browser/extensions/api/proxy/proxy_api_constants.cc
+++ b/chrome/browser/extensions/api/proxy/proxy_api_constants.cc
@@ -42,13 +42,13 @@ const char* const scheme_name[] = { "*error*",
"ftp",
"socks" };
-COMPILE_ASSERT(SCHEME_MAX == SCHEME_FALLBACK,
- SCHEME_MAX_must_equal_SCHEME_FALLBACK);
-COMPILE_ASSERT(arraysize(field_name) == SCHEME_MAX + 1,
- field_name_array_is_wrong_size);
-COMPILE_ASSERT(arraysize(scheme_name) == SCHEME_MAX + 1,
- scheme_name_array_is_wrong_size);
-COMPILE_ASSERT(SCHEME_ALL == 0, singleProxy_must_be_first_option);
+static_assert(SCHEME_MAX == SCHEME_FALLBACK,
+ "SCHEME_MAX is incorrect");
+static_assert(arraysize(field_name) == SCHEME_MAX + 1,
+ "field_name array size is incorrect");
+static_assert(arraysize(scheme_name) == SCHEME_MAX + 1,
+ "scheme_name array size is incorrect");
+static_assert(SCHEME_ALL == 0, "SCHEME_ALL must be the first value");
} // namespace proxy_api_constants
} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698