Adapt to cases when conversion is a no-op

This commit is contained in:
Dmitry-Me 2017-08-29 21:21:48 +03:00
parent 4734301bef
commit 6f0d5aaee3
1 changed files with 2 additions and 3 deletions

View File

@ -975,9 +975,8 @@ void CppCheckExecutor::reportErr(const std::string &errmsg)
_errorList.insert(errmsg);
if (errorOutput)
*errorOutput << errmsg << std::endl;
else {
const bool doConvert = (_settings == nullptr) ? true : !_settings->xml;
std::cerr << ansiToOEM(errmsg, doConvert) << std::endl;
else {
std::cerr << ansiToOEM(errmsg, (_settings == nullptr) ? true : !_settings->xml) << std::endl;
}
}