Chromium Code Reviews

Unified Diff: components/omnibox/autocomplete_match_type.cc

Issue 794683005: replace COMPILE_ASSERT with static_assert in components/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: formatting fixup Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: components/omnibox/autocomplete_match_type.cc
diff --git a/components/omnibox/autocomplete_match_type.cc b/components/omnibox/autocomplete_match_type.cc
index 4cc28c37f0313c87cc2621c68fb4b204eeefe65b..a5c97b0043e7a416f76782a052de32a82f305557 100644
--- a/components/omnibox/autocomplete_match_type.cc
+++ b/components/omnibox/autocomplete_match_type.cc
@@ -29,7 +29,7 @@ std::string AutocompleteMatchType::ToString(AutocompleteMatchType::Type type) {
"navsuggest-personalized",
"search-suggest-answer",
};
- COMPILE_ASSERT(arraysize(strings) == AutocompleteMatchType::NUM_TYPES,
- strings_array_must_match_type_enum);
+ static_assert(arraysize(strings) == AutocompleteMatchType::NUM_TYPES,
+ "strings array must have NUM_TYPES elements");
return strings[type];
}
« no previous file with comments | « components/omnibox/autocomplete_match.cc ('k') | components/policy/core/common/cloud/cloud_policy_validator.cc » ('j') | no next file with comments »

Powered by Google App Engine