Compile fixes

This commit is contained in:
Phillip Stephens 2019-06-20 15:45:11 -07:00
parent e1e920987f
commit afb1162c43
1 changed files with 2 additions and 2 deletions

View File

@ -30,7 +30,7 @@ static std::string_view RecursiveLookup(const athena::io::YAMLNode* node, std::s
if (*it == '/') { if (*it == '/') {
const athena::io::YAMLNode* ch = node->findMapChild(std::string(start, it)); const athena::io::YAMLNode* ch = node->findMapChild(std::string(start, it));
if (!ch) if (!ch)
return nullptr; return {};
return RecursiveLookup(ch, it + 1, end); return RecursiveLookup(ch, it + 1, end);
} }
} }
@ -42,7 +42,7 @@ static std::string_view RecursiveLookup(const athena::io::YAMLNode* node, std::s
std::string_view Translator::translate(std::string_view key) const { std::string_view Translator::translate(std::string_view key) const {
if (!m_targetLocale->rootNode()) if (!m_targetLocale->rootNode())
return nullptr; return {};
return RecursiveLookup(m_targetLocale->rootNode(), key.cbegin(), key.cend()); return RecursiveLookup(m_targetLocale->rootNode(), key.cbegin(), key.cend());
} }