1
This commit is contained in:
parent
2ccb754b1b
commit
e203bb62fc
@ -181,5 +181,8 @@ std::string MetaMgr::ReplaceDirtyWord(const std::string& text, char c)
|
|||||||
std::string MetaMgr::GetText(const std::string& textid, const std::string& def_text)
|
std::string MetaMgr::GetText(const std::string& textid, const std::string& def_text)
|
||||||
{
|
{
|
||||||
auto itr = loader_->text_hash.find(textid);
|
auto itr = loader_->text_hash.find(textid);
|
||||||
return itr != loader_->text_hash.end() ? itr->second : def_text;
|
if (itr != loader_->text_hash.end()) {
|
||||||
|
return itr->second;
|
||||||
|
}
|
||||||
|
return loader_->text_hash.empty() ? def_text : "";
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user