Skip to content

Commit b620f2f

Browse files
committedMay 28, 2018
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) { ```·
1 parent a363a9b commit b620f2f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

Diff for: ‎src/translation.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ const std::wstring &Translations::getTranslation(
4040
std::wstring key = textdomain + L"|" + s;
4141
try {
4242
return m_translations.at(key);
43-
} catch (std::out_of_range) {
43+
} catch (const std::out_of_range &) {
4444
warningstream << "Translations: can't find translation for string \""
4545
<< wide_to_utf8(s) << "\" in textdomain \""
4646
<< wide_to_utf8(textdomain) << "\"" << std::endl;
@@ -147,4 +147,4 @@ void Translations::loadTranslation(const std::string &data)
147147

148148
m_translations[textdomain + L"|" + oword1] = oword2;
149149
}
150-
}
150+
}

0 commit comments

Comments
 (0)
Please sign in to comment.