Fixed wrong comparison for language detection.

This commit is contained in:
Patrick Lühne 2016-06-10 01:25:51 +02:00
parent 2e1a011dcf
commit eb5a120286

View File

@ -27,7 +27,7 @@ std::string Language::toString(Language::Type language)
{
const auto match = languageNames.left.find(language);
if (match != languageNames.left.end())
if (match == languageNames.left.end())
return "Unknown";
return match->second;
@ -39,7 +39,7 @@ Language::Type Language::fromString(const std::string &languageName)
{
const auto match = languageNames.right.find(languageName);
if (match != languageNames.right.end())
if (match == languageNames.right.end())
return Language::Type::Unknown;
return match->second;