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

Unified Diff: extensions/common/url_pattern.cc

Issue 859993002: Using "static_assert" in lieu of "COMPILE_ASSERT" in extensions module (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « extensions/common/permissions/permission_message_util.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/common/url_pattern.cc
diff --git a/extensions/common/url_pattern.cc b/extensions/common/url_pattern.cc
index 71b522e1cd0d623b9f0a1b5c629b70b2f8752dfd..40142cf79cbbc2e573bb6d8a5b5a4e2b5cd860c3 100644
--- a/extensions/common/url_pattern.cc
+++ b/extensions/common/url_pattern.cc
@@ -43,8 +43,8 @@ const int kValidSchemeMasks[] = {
URLPattern::SCHEME_FILESYSTEM,
};
-COMPILE_ASSERT(arraysize(kValidSchemes) == arraysize(kValidSchemeMasks),
- must_keep_these_arrays_in_sync);
+static_assert(arraysize(kValidSchemes) == arraysize(kValidSchemeMasks),
+ "must keep these arrays in sync");
const char kParseSuccess[] = "Success.";
const char kParseErrorMissingSchemeSeparator[] = "Missing scheme separator.";
@@ -69,8 +69,8 @@ const char* const kParseResultMessages[] = {
kParseErrorInvalidHost,
};
-COMPILE_ASSERT(URLPattern::NUM_PARSE_RESULTS == arraysize(kParseResultMessages),
- must_add_message_for_each_parse_result);
+static_assert(URLPattern::NUM_PARSE_RESULTS == arraysize(kParseResultMessages),
+ "must add message for each parse result");
const char kPathSeparator[] = "/";
« no previous file with comments | « extensions/common/permissions/permission_message_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698