Merge branch 'master' into jgrpp
# Conflicts: # src/company_cmd.cpp # src/core/overflowsafe_type.hpp # src/economy.cpp # src/engine_base.h # src/ground_vehicle.cpp # src/group_gui.cpp # src/industry_cmd.cpp # src/industry_gui.cpp # src/newgrf_commons.cpp # src/newgrf_engine.cpp # src/newgrf_industries.cpp # src/newgrf_object.cpp # src/newgrf_roadstop.cpp # src/newgrf_station.cpp # src/rail_gui.cpp # src/road_cmd.h # src/road_gui.cpp # src/saveload/afterload.cpp # src/script/api/script_log.cpp # src/script/api/script_log.hpp # src/settings_gui.cpp # src/settingsgen/settingsgen.cpp # src/station_cmd.cpp # src/station_cmd.h # src/station_gui.cpp # src/strgen/strgen.cpp # src/string_func.h # src/string_type.h # src/table/settings/network_private_settings.ini # src/tests/math_func.cpp # src/textfile_gui.cpp # src/timetable_gui.cpp # src/town_cmd.cpp # src/vehicle.cpp # src/waypoint_cmd.cpp # src/waypoint_cmd.h # src/widgets/dropdown.cpp
This commit is contained in:
@@ -2504,9 +2504,13 @@ bool MissingGlyphSearcher::FindMissingGlyphs()
|
||||
}
|
||||
|
||||
this->Reset();
|
||||
for (const char *text = this->NextString(); text != nullptr; text = this->NextString()) {
|
||||
for (auto text = this->NextString(); text.has_value(); text = this->NextString()) {
|
||||
auto src = text->cbegin();
|
||||
|
||||
FontSize size = this->DefaultSize();
|
||||
for (WChar c = Utf8Consume(&text); c != '\0'; c = Utf8Consume(&text)) {
|
||||
while (src != text->cend()) {
|
||||
WChar c = Utf8Consume(src);
|
||||
|
||||
if (c >= SCC_FIRST_FONT && c <= SCC_LAST_FONT) {
|
||||
size = (FontSize)(c - SCC_FIRST_FONT);
|
||||
} else if (!IsInsideMM(c, SCC_SPRITE_START, SCC_SPRITE_END) && IsPrintable(c) && !IsTextDirectionChar(c) && c != '?' && GetGlyph(size, c) == question_mark[size]) {
|
||||
@@ -2545,9 +2549,9 @@ class LanguagePackGlyphSearcher : public MissingGlyphSearcher {
|
||||
return FS_NORMAL;
|
||||
}
|
||||
|
||||
const char *NextString() override
|
||||
std::optional<std::string_view> NextString() override
|
||||
{
|
||||
if (this->i >= TEXT_TAB_END) return nullptr;
|
||||
if (this->i >= TEXT_TAB_END) return std::nullopt;
|
||||
|
||||
const char *ret = _langpack.offsets[_langpack.langtab_start[this->i] + this->j];
|
||||
|
||||
|
Reference in New Issue
Block a user