Fixed Cppcheck shadowVar warnings

This commit is contained in:
Daniel Marjamäki 2019-04-30 21:01:18 +02:00
parent 66064fb2bb
commit 7260bdd6d8
2 changed files with 4 additions and 7 deletions

View File

@ -541,8 +541,8 @@ bool CmdLineParser::parseFromArgs(int argc, const char* const argv[])
return false;
}
for (const std::string &i : mSettings->project.guiProject.excludedPaths)
mIgnoredPaths.emplace_back(i);
for (const std::string &ignorePath : mSettings->project.guiProject.excludedPaths)
mIgnoredPaths.emplace_back(ignorePath);
const std::string platform(mSettings->project.guiProject.platform);

View File

@ -316,17 +316,14 @@ std::size_t TestFixture::runTests(const options& args)
countTests = 0;
errmsg.str("");
const std::set<std::string>& tests = args.which_test();
for (std::string classname : tests) {
for (std::string classname : args.which_test()) {
std::string testname;
if (classname.find("::") != std::string::npos) {
testname = classname.substr(classname.find("::") + 2);
classname.erase(classname.find("::"));
}
const TestSet &tests = TestRegistry::theInstance().tests();
for (TestFixture * test : tests) {
for (TestFixture * test : TestRegistry::theInstance().tests()) {
if (classname.empty() || test->classname == classname) {
test->processOptions(args);
test->run(testname);