chore: fix clang-tidy warnings (#38079)

* chore: fix clang-tidy warnings

* refactor: avoid need for NOLINTNEXTLINE
This commit is contained in:
David Sanders 2023-04-26 07:09:54 -07:00 committed by GitHub
parent fe5cdd39d6
commit 08593fd2bd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 41 additions and 37 deletions

View file

@ -103,13 +103,11 @@ const FontDefault kFontDefaults[] = {
IDS_FIXED_FONT_FAMILY_TRADITIONAL_HAN},
#endif
};
const size_t kFontDefaultsLength = std::size(kFontDefaults);
// ^^^^^ DO NOT EDIT ^^^^^
std::string GetDefaultFontForPref(const char* pref_name) {
for (size_t i = 0; i < kFontDefaultsLength; ++i) {
FontDefault pref = kFontDefaults[i];
for (auto pref : kFontDefaults) {
if (strcmp(pref.pref_name, pref_name) == 0) {
return l10n_util::GetStringUTF8(pref.resource_id);
}