mirror of https://github.com/OpenTTD/OpenTTD
Codechange: Use FontSizeToName() instead of switch block. (#14395)
parent
f41ad372a3
commit
20ed5be905
|
@ -2269,17 +2269,7 @@ bool MissingGlyphSearcher::FindMissingGlyphs()
|
|||
fc = FontCache::Get(size);
|
||||
} else if (!IsInsideMM(c, SCC_SPRITE_START, SCC_SPRITE_END) && IsPrintable(c) && !IsTextDirectionChar(c) && fc->MapCharToGlyph(c, false) == 0) {
|
||||
/* The character is printable, but not in the normal font. This is the case we were testing for. */
|
||||
std::string size_name;
|
||||
|
||||
switch (size) {
|
||||
case FS_NORMAL: size_name = "medium"; break;
|
||||
case FS_SMALL: size_name = "small"; break;
|
||||
case FS_LARGE: size_name = "large"; break;
|
||||
case FS_MONO: size_name = "mono"; break;
|
||||
default: NOT_REACHED();
|
||||
}
|
||||
|
||||
Debug(fontcache, 0, "Font is missing glyphs to display char 0x{:X} in {} font size", (int)c, size_name);
|
||||
Debug(fontcache, 0, "Font is missing glyphs to display char 0x{:X} in {} font size", static_cast<uint32_t>(c), FontSizeToName(size));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue