From 5df954690787dedbbf3c35f658f010f388474676 Mon Sep 17 00:00:00 2001 From: Uwe Date: Sat, 24 Sep 2022 20:44:07 +0200 Subject: [PATCH] [App] Application.cpp: silence some CI warnings about whitespace, line length etc. --- src/App/Application.cpp | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/src/App/Application.cpp b/src/App/Application.cpp index 22eac2928d..229e30b036 100644 --- a/src/App/Application.cpp +++ b/src/App/Application.cpp @@ -428,10 +428,8 @@ Document* Application::newDocument(const char * Name, const char * UserName, boo std::vector names; names.reserve(DocMap.size()); std::map::const_iterator pos; - for (pos = DocMap.begin();pos != DocMap.end();++pos) { + for (pos = DocMap.begin(); pos != DocMap.end(); ++pos) names.emplace_back(pos->second->Label.getValue()); - } - if (!names.empty()) userName = Base::Tools::getUniqueName(userName, names); } @@ -570,7 +568,7 @@ std::string Application::getUniqueDocumentName(const char *Name, bool tempDoc) c else { std::vector names; names.reserve(DocMap.size()); - for (pos = DocMap.begin();pos != DocMap.end();++pos) { + for (pos = DocMap.begin(); pos != DocMap.end(); ++pos) { if (!tempDoc || !pos->second->testStatus(Document::TempDoc)) names.push_back(pos->first); } @@ -2314,7 +2312,7 @@ void processProgramOptions(const variables_map& vm, std::map Mods = vm["module-path"].as< vector >(); string temp; - for (vector::const_iterator It= Mods.begin();It != Mods.end();++It) + for (vector::const_iterator It = Mods.begin(); It != Mods.end(); ++It) temp += *It + ";"; temp.erase(temp.end()-1); mConfig["AdditionalModulePaths"] = temp; @@ -2322,14 +2320,14 @@ void processProgramOptions(const variables_map& vm, std::map Paths = vm["python-path"].as< vector >(); - for (vector::const_iterator It= Paths.begin();It != Paths.end();++It) + for (vector::const_iterator It = Paths.begin(); It != Paths.end(); ++It) Base::Interpreter().addPythonPath(It->c_str()); } if (vm.count("input-file")) { vector files(vm["input-file"].as< vector >()); int OpenFileCount=0; - for (vector::const_iterator It = files.begin();It != files.end();++It) { + for (vector::const_iterator It = files.begin(); It != files.end(); ++It) { //cout << "Input files are: " // << vm["input-file"].as< vector >() << "\n"; @@ -2800,7 +2798,7 @@ void Application::runApplication() Base::Console().Log("Exiting on purpose\n"); } else { - Base::Console().Log("Unknown Run mode (%d) in main()?!?\n\n",mConfig["RunMode"].c_str()); + Base::Console().Log("Unknown Run mode (%d) in main()?!?\n\n", mConfig["RunMode"].c_str()); } } @@ -2810,9 +2808,9 @@ void Application::logStatus() boost::posix_time::second_clock::local_time()); Base::Console().Log("Time = %s\n", time_str.c_str()); - for (std::map::iterator It = mConfig.begin();It!= mConfig.end();++It) { - Base::Console().Log("%s = %s\n",It->first.c_str(),It->second.c_str()); - } + for (std::map::iterator It = mConfig.begin(); It != mConfig.end(); + ++It) + Base::Console().Log("%s = %s\n", It->first.c_str(), It->second.c_str()); } void Application::LoadParameters()