Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix a -Wcatch-value warning reported by GCC 8.1
```
src/translation.cpp:43:16: warning: interception du type polymorphique « class std::out_of_range » par valeur [-Wcatch-value=]
  } catch (std::out_of_range) {
```·
  • Loading branch information
nerzhul committed May 28, 2018
1 parent a363a9b commit b620f2f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/translation.cpp
Expand Up @@ -40,7 +40,7 @@ const std::wstring &Translations::getTranslation(
std::wstring key = textdomain + L"|" + s;
try {
return m_translations.at(key);
} catch (std::out_of_range) {
} catch (const std::out_of_range &) {
warningstream << "Translations: can't find translation for string \""
<< wide_to_utf8(s) << "\" in textdomain \""
<< wide_to_utf8(textdomain) << "\"" << std::endl;
Expand Down Expand Up @@ -147,4 +147,4 @@ void Translations::loadTranslation(const std::string &data)

m_translations[textdomain + L"|" + oword1] = oword2;
}
}
}

0 comments on commit b620f2f

Please sign in to comment.