mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-28 21:07:59 +03:00
Merge branch 'string_viewing' into 'master'
Use string_view in yet more places See merge request OpenMW/openmw!2348
This commit is contained in:
commit
4ff7f8ddfb
50 changed files with 141 additions and 149 deletions
|
@ -18,7 +18,7 @@ bool replaceTag(const MyGUI::UString& tag, MyGUI::UString& out)
|
|||
if (tag.compare(0, fontcolourLength, fontcolour) == 0)
|
||||
{
|
||||
std::string fallbackName = "FontColor_color_" + tag.substr(fontcolourLength);
|
||||
std::string str = Fallback::Map::getString(fallbackName);
|
||||
std::string_view str = Fallback::Map::getString(fallbackName);
|
||||
if (str.empty())
|
||||
throw std::runtime_error("Unknown fallback name: " + fallbackName);
|
||||
|
||||
|
@ -36,7 +36,7 @@ bool replaceTag(const MyGUI::UString& tag, MyGUI::UString& out)
|
|||
else if (tag.compare(0, fontcolourhtmlLength, fontcolourhtml) == 0)
|
||||
{
|
||||
std::string fallbackName = "FontColor_color_" + tag.substr(fontcolourhtmlLength);
|
||||
std::string str = Fallback::Map::getString(fallbackName);
|
||||
std::string_view str = Fallback::Map::getString(fallbackName);
|
||||
if (str.empty())
|
||||
throw std::runtime_error("Unknown fallback name: " + fallbackName);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue