mirror of
https://github.com/minetest/minetest.git
synced 2024-12-24 23:22:24 +01:00
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) { ```·
This commit is contained in:
parent
a363a9bf71
commit
b620f2f02d
@ -40,7 +40,7 @@ const std::wstring &Translations::getTranslation(
|
|||||||
std::wstring key = textdomain + L"|" + s;
|
std::wstring key = textdomain + L"|" + s;
|
||||||
try {
|
try {
|
||||||
return m_translations.at(key);
|
return m_translations.at(key);
|
||||||
} catch (std::out_of_range) {
|
} catch (const std::out_of_range &) {
|
||||||
warningstream << "Translations: can't find translation for string \""
|
warningstream << "Translations: can't find translation for string \""
|
||||||
<< wide_to_utf8(s) << "\" in textdomain \""
|
<< wide_to_utf8(s) << "\" in textdomain \""
|
||||||
<< wide_to_utf8(textdomain) << "\"" << std::endl;
|
<< wide_to_utf8(textdomain) << "\"" << std::endl;
|
||||||
|
Loading…
Reference in New Issue
Block a user