From cefcde9ba9a4d951500ffb267134eaebaad6b928 Mon Sep 17 00:00:00 2001 From: DDuarte Date: Fri, 19 Sep 2014 03:30:02 +0100 Subject: Core/Misc: Multiple static analysis issues fixed (small optimizations and clear code) --- src/server/shared/Utilities/Util.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/server/shared/Utilities/Util.h') diff --git a/src/server/shared/Utilities/Util.h b/src/server/shared/Utilities/Util.h index 6370b9fda09..d88ad3be8e1 100644 --- a/src/server/shared/Utilities/Util.h +++ b/src/server/shared/Utilities/Util.h @@ -147,7 +147,7 @@ inline bool Utf8toWStr(const std::string& utf8str, wchar_t* wstr, size_t& wsize) return Utf8toWStr(utf8str.c_str(), utf8str.size(), wstr, wsize); } -bool WStrToUtf8(std::wstring wstr, std::string& utf8str); +bool WStrToUtf8(std::wstring const& wstr, std::string& utf8str); // size==real string size bool WStrToUtf8(wchar_t* wstr, size_t size, std::string& utf8str); @@ -331,11 +331,11 @@ inline void wstrToLower(std::wstring& str) std::transform( str.begin(), str.end(), str.begin(), wcharToLower ); } -std::wstring GetMainPartOfName(std::wstring wname, uint32 declension); +std::wstring GetMainPartOfName(std::wstring const& wname, uint32 declension); bool utf8ToConsole(const std::string& utf8str, std::string& conStr); bool consoleToUtf8(const std::string& conStr, std::string& utf8str); -bool Utf8FitTo(const std::string& str, std::wstring search); +bool Utf8FitTo(const std::string& str, std::wstring const& search); void utf8printf(FILE* out, const char *str, ...); void vutf8printf(FILE* out, const char *str, va_list* ap); -- cgit v1.2.3