Refactoring
This commit is contained in:
parent
07b5afcdc6
commit
b813a6d407
|
@ -261,11 +261,10 @@ bool CmdLineParser::ParseFromArgs(int argc, const char* const argv[])
|
|||
if (pos == std::string::npos) {
|
||||
_settings->basePaths.push_back(Path::fromNativeSeparators(paths));
|
||||
break;
|
||||
} else {
|
||||
}
|
||||
_settings->basePaths.push_back(Path::fromNativeSeparators(paths.substr(0, pos)));
|
||||
paths.erase(0, pos + 1);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
PrintMessage("cppcheck: No paths specified for the '" + std::string(argv[i]) + "' option.");
|
||||
return false;
|
||||
|
|
|
@ -121,8 +121,7 @@ bool CppCheckExecutor::parseFromArgs(CppCheck *cppcheck, int argc, const char* c
|
|||
|
||||
// Check that all include paths exist
|
||||
{
|
||||
std::list<std::string>::iterator iter;
|
||||
for (iter = settings.includePaths.begin();
|
||||
for (std::list<std::string>::iterator iter = settings.includePaths.begin();
|
||||
iter != settings.includePaths.end();
|
||||
) {
|
||||
const std::string path(Path::toNativeSeparators(*iter));
|
||||
|
@ -195,9 +194,8 @@ int CppCheckExecutor::check(int argc, const char* const argv[])
|
|||
}
|
||||
if (cppCheck.settings().exceptionHandling) {
|
||||
return check_wrapper(cppCheck, argc, argv);
|
||||
} else {
|
||||
return check_internal(cppCheck, argc, argv);
|
||||
}
|
||||
return check_internal(cppCheck, argc, argv);
|
||||
}
|
||||
|
||||
void CppCheckExecutor::setSettings(const Settings &settings)
|
||||
|
@ -949,7 +947,6 @@ int CppCheckExecutor::check_internal(CppCheck& cppcheck, int /*argc*/, const cha
|
|||
_settings = nullptr;
|
||||
if (returnValue)
|
||||
return settings.exitCode;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue