diff options
author | Loïc Blot <loic.blot@unix-experience.fr> | 2018-05-28 14:17:19 +0200 |
---|---|---|
committer | Loïc Blot <loic.blot@unix-experience.fr> | 2018-05-28 14:17:19 +0200 |
commit | b620f2f02db4755f988f24522f4d77d890f6421d (patch) | |
tree | 03714dddab0e0e3d259b073458493ccbd696ae43 /src | |
parent | a363a9bf7150b0513aa997029610d19318d70767 (diff) | |
download | minetest-b620f2f02db4755f988f24522f4d77d890f6421d.tar.gz minetest-b620f2f02db4755f988f24522f4d77d890f6421d.tar.bz2 minetest-b620f2f02db4755f988f24522f4d77d890f6421d.zip |
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) {
```·
Diffstat (limited to 'src')
-rw-r--r-- | src/translation.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/translation.cpp b/src/translation.cpp index 31efca41e..60531be67 100644 --- a/src/translation.cpp +++ b/src/translation.cpp @@ -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; @@ -147,4 +147,4 @@ void Translations::loadTranslation(const std::string &data) m_translations[textdomain + L"|" + oword1] = oword2; } -}
\ No newline at end of file +} |