Refactor cli/cppcheckexecutor.cpp
This commit is contained in:
parent
e65c63e2bb
commit
c2e54fa87f
|
@ -581,7 +581,7 @@ namespace {
|
||||||
const HANDLE hThread = GetCurrentThread();
|
const HANDLE hThread = GetCurrentThread();
|
||||||
BOOL result = pSymInitialize(
|
BOOL result = pSymInitialize(
|
||||||
hProcess,
|
hProcess,
|
||||||
0,
|
nullptr,
|
||||||
TRUE
|
TRUE
|
||||||
);
|
);
|
||||||
CONTEXT context = *(ex->ContextRecord);
|
CONTEXT context = *(ex->ContextRecord);
|
||||||
|
@ -642,7 +642,7 @@ namespace {
|
||||||
}
|
}
|
||||||
|
|
||||||
FreeLibrary(hLibDbgHelp);
|
FreeLibrary(hLibDbgHelp);
|
||||||
hLibDbgHelp=0;
|
hLibDbgHelp=nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
void writeMemoryErrorDetails(FILE* outputFile, PEXCEPTION_POINTERS ex, const char* description)
|
void writeMemoryErrorDetails(FILE* outputFile, PEXCEPTION_POINTERS ex, const char* description)
|
||||||
|
@ -963,7 +963,7 @@ static inline std::string ansiToOEM(const std::string &msg, bool doConvert)
|
||||||
// ansi code page characters to wide characters
|
// ansi code page characters to wide characters
|
||||||
MultiByteToWideChar(CP_ACP, 0, msg.data(), msglength, wcContainer.data(), msglength);
|
MultiByteToWideChar(CP_ACP, 0, msg.data(), msglength, wcContainer.data(), msglength);
|
||||||
// wide characters to oem codepage characters
|
// wide characters to oem codepage characters
|
||||||
WideCharToMultiByte(CP_OEMCP, 0, wcContainer.data(), msglength, const_cast<char *>(result.data()), msglength, NULL, NULL);
|
WideCharToMultiByte(CP_OEMCP, 0, wcContainer.data(), msglength, const_cast<char *>(result.data()), msglength, nullptr, nullptr);
|
||||||
|
|
||||||
return result; // hope for return value optimization
|
return result; // hope for return value optimization
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue