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

Side by Side 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. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/omnibox/autocomplete_match_type.h" 5 #include "components/omnibox/autocomplete_match_type.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 8
9 // static 9 // static
10 std::string AutocompleteMatchType::ToString(AutocompleteMatchType::Type type) { 10 std::string AutocompleteMatchType::ToString(AutocompleteMatchType::Type type) {
(...skipping 11 matching lines...) Expand all
22 "search-suggest-infinite", 22 "search-suggest-infinite",
23 "search-suggest-personalized", 23 "search-suggest-personalized",
24 "search-suggest-profile", 24 "search-suggest-profile",
25 "search-other-engine", 25 "search-other-engine",
26 "extension-app", 26 "extension-app",
27 "contact", 27 "contact",
28 "bookmark-title", 28 "bookmark-title",
29 "navsuggest-personalized", 29 "navsuggest-personalized",
30 "search-suggest-answer", 30 "search-suggest-answer",
31 }; 31 };
32 COMPILE_ASSERT(arraysize(strings) == AutocompleteMatchType::NUM_TYPES, 32 static_assert(arraysize(strings) == AutocompleteMatchType::NUM_TYPES,
33 strings_array_must_match_type_enum); 33 "strings array must have NUM_TYPES elements");
34 return strings[type]; 34 return strings[type];
35 } 35 }
OLDNEW
« 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
This is Rietveld 408576698