aboutsummaryrefslogtreecommitdiff
path: root/src/common/Utilities/Util.cpp
diff options
context:
space:
mode:
authorjackpoz <giacomopoz@gmail.com>2019-03-30 17:48:36 +0100
committerjackpoz <giacomopoz@gmail.com>2019-03-31 17:34:28 +0200
commit1d04a3b216901671eae0104547715a570b1ff3ab (patch)
tree6736646c01e731af453241cb00d4fefbb1086d30 /src/common/Utilities/Util.cpp
parent4f1f8983a7f304ec11ab1b1306499b09a6b05369 (diff)
Core/Misc: Fix GCC 8 warnings
Diffstat (limited to 'src/common/Utilities/Util.cpp')
-rw-r--r--src/common/Utilities/Util.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/common/Utilities/Util.cpp b/src/common/Utilities/Util.cpp
index 3735cca089f..668b1a9dce7 100644
--- a/src/common/Utilities/Util.cpp
+++ b/src/common/Utilities/Util.cpp
@@ -221,7 +221,7 @@ size_t utf8length(std::string& utf8str)
{
return utf8::distance(utf8str.c_str(), utf8str.c_str()+utf8str.size());
}
- catch(std::exception)
+ catch(std::exception const&)
{
utf8str.clear();
return 0;
@@ -243,7 +243,7 @@ void utf8truncate(std::string& utf8str, size_t len)
char* oend = utf8::utf16to8(wstr.c_str(), wstr.c_str()+wstr.size(), &utf8str[0]);
utf8str.resize(oend-(&utf8str[0])); // remove unused tail
}
- catch(std::exception)
+ catch(std::exception const&)
{
utf8str.clear();
}
@@ -258,7 +258,7 @@ bool Utf8toWStr(char const* utf8str, size_t csize, wchar_t* wstr, size_t& wsize)
wsize -= out.remaining(); // remaining unused space
wstr[wsize] = L'\0';
}
- catch(std::exception)
+ catch(std::exception const&)
{
// Replace the converted string with an error message if there is enough space
// Otherwise just return an empty string
@@ -290,7 +290,7 @@ bool Utf8toWStr(const std::string& utf8str, std::wstring& wstr)
{
utf8::utf8to16(utf8str.c_str(), utf8str.c_str()+utf8str.size(), std::back_inserter(wstr));
}
- catch(std::exception)
+ catch(std::exception const&)
{
wstr.clear();
return false;
@@ -313,7 +313,7 @@ bool WStrToUtf8(wchar_t* wstr, size_t size, std::string& utf8str)
}
utf8str = utf8str2;
}
- catch(std::exception)
+ catch(std::exception const&)
{
utf8str.clear();
return false;
@@ -336,7 +336,7 @@ bool WStrToUtf8(std::wstring const& wstr, std::string& utf8str)
}
utf8str = utf8str2;
}
- catch(std::exception)
+ catch(std::exception const&)
{
utf8str.clear();
return false;