diff options
Diffstat (limited to 'src/server/shared')
-rw-r--r-- | src/server/shared/Debugging/WheatyExceptionReport.cpp | 3 | ||||
-rw-r--r-- | src/server/shared/Utilities/Util.h | 8 |
2 files changed, 5 insertions, 6 deletions
diff --git a/src/server/shared/Debugging/WheatyExceptionReport.cpp b/src/server/shared/Debugging/WheatyExceptionReport.cpp index d4bd630ca25..f4da4093dfa 100644 --- a/src/server/shared/Debugging/WheatyExceptionReport.cpp +++ b/src/server/shared/Debugging/WheatyExceptionReport.cpp @@ -350,13 +350,12 @@ void WheatyExceptionReport::PrintSystemInfo() //=========================================================================== void WheatyExceptionReport::printTracesForAllThreads() { - HANDLE hThreadSnap = INVALID_HANDLE_VALUE; THREADENTRY32 te32; DWORD dwOwnerPID = GetCurrentProcessId(); m_hProcess = GetCurrentProcess(); // Take a snapshot of all running threads - hThreadSnap = CreateToolhelp32Snapshot(TH32CS_SNAPTHREAD, 0); + HANDLE hThreadSnap = CreateToolhelp32Snapshot(TH32CS_SNAPTHREAD, 0); if (hThreadSnap == INVALID_HANDLE_VALUE) return; diff --git a/src/server/shared/Utilities/Util.h b/src/server/shared/Utilities/Util.h index a5b2a7b9cc2..6d0216225da 100644 --- a/src/server/shared/Utilities/Util.h +++ b/src/server/shared/Utilities/Util.h @@ -242,7 +242,7 @@ inline bool isNumericOrSpace(wchar_t wchar) return isNumeric(wchar) || wchar == L' '; } -inline bool isBasicLatinString(std::wstring wstr, bool numericOrSpace) +inline bool isBasicLatinString(const std::wstring &wstr, bool numericOrSpace) { for (size_t i = 0; i < wstr.size(); ++i) if (!isBasicLatinCharacter(wstr[i]) && (!numericOrSpace || !isNumericOrSpace(wstr[i]))) @@ -250,7 +250,7 @@ inline bool isBasicLatinString(std::wstring wstr, bool numericOrSpace) return true; } -inline bool isExtendedLatinString(std::wstring wstr, bool numericOrSpace) +inline bool isExtendedLatinString(const std::wstring &wstr, bool numericOrSpace) { for (size_t i = 0; i < wstr.size(); ++i) if (!isExtendedLatinCharacter(wstr[i]) && (!numericOrSpace || !isNumericOrSpace(wstr[i]))) @@ -258,7 +258,7 @@ inline bool isExtendedLatinString(std::wstring wstr, bool numericOrSpace) return true; } -inline bool isCyrillicString(std::wstring wstr, bool numericOrSpace) +inline bool isCyrillicString(const std::wstring &wstr, bool numericOrSpace) { for (size_t i = 0; i < wstr.size(); ++i) if (!isCyrillicCharacter(wstr[i]) && (!numericOrSpace || !isNumericOrSpace(wstr[i]))) @@ -266,7 +266,7 @@ inline bool isCyrillicString(std::wstring wstr, bool numericOrSpace) return true; } -inline bool isEastAsianString(std::wstring wstr, bool numericOrSpace) +inline bool isEastAsianString(const std::wstring &wstr, bool numericOrSpace) { for (size_t i = 0; i < wstr.size(); ++i) if (!isEastAsianCharacter(wstr[i]) && (!numericOrSpace || !isNumericOrSpace(wstr[i]))) |