Fixed wrong comparison for language detection.
This commit is contained in:
parent
2e1a011dcf
commit
eb5a120286
@ -27,7 +27,7 @@ std::string Language::toString(Language::Type language)
|
|||||||
{
|
{
|
||||||
const auto match = languageNames.left.find(language);
|
const auto match = languageNames.left.find(language);
|
||||||
|
|
||||||
if (match != languageNames.left.end())
|
if (match == languageNames.left.end())
|
||||||
return "Unknown";
|
return "Unknown";
|
||||||
|
|
||||||
return match->second;
|
return match->second;
|
||||||
@ -39,7 +39,7 @@ Language::Type Language::fromString(const std::string &languageName)
|
|||||||
{
|
{
|
||||||
const auto match = languageNames.right.find(languageName);
|
const auto match = languageNames.right.find(languageName);
|
||||||
|
|
||||||
if (match != languageNames.right.end())
|
if (match == languageNames.right.end())
|
||||||
return Language::Type::Unknown;
|
return Language::Type::Unknown;
|
||||||
|
|
||||||
return match->second;
|
return match->second;
|
||||||
|
Reference in New Issue
Block a user