Merge pull request #10697 from Chaplain/authserver

Auth/Misc: Code cleanup.
This commit is contained in:
Subv
2013-09-03 14:59:56 -07:00
5 changed files with 20 additions and 22 deletions

View File

@@ -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;

View File

@@ -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])))