diff options
author | Artur Ryt <artur.ryt@gmail.com> | 2019-02-07 21:39:05 (GMT) |
---|---|---|
committer | Artur Ryt <artur.ryt@gmail.com> | 2019-02-07 21:39:05 (GMT) |
commit | 01b2d6ab7465e7f22fb821876027df86b0c8f363 (patch) | |
tree | 7ae313670e3655269ef7f9db6feabdc4bb2aaf25 /Source/cmFLTKWrapUICommand.cxx | |
parent | 15bdbec0176e3aa620bb5bda3631819c5ca18eaf (diff) | |
download | CMake-01b2d6ab7465e7f22fb821876027df86b0c8f363.zip CMake-01b2d6ab7465e7f22fb821876027df86b0c8f363.tar.gz CMake-01b2d6ab7465e7f22fb821876027df86b0c8f363.tar.bz2 |
Modernize: Use ranged for-loops when possible
Replaced most manual `const_iterator`-based loops and some
reverse-iterator loops with range loops.
Fixes: #18858
Diffstat (limited to 'Source/cmFLTKWrapUICommand.cxx')
-rw-r--r-- | Source/cmFLTKWrapUICommand.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/cmFLTKWrapUICommand.cxx b/Source/cmFLTKWrapUICommand.cxx index 4b14d26..1b509ef 100644 --- a/Source/cmFLTKWrapUICommand.cxx +++ b/Source/cmFLTKWrapUICommand.cxx @@ -4,6 +4,7 @@ #include <stddef.h> +#include "cmAlgorithms.h" #include "cmCustomCommandLines.h" #include "cmMakefile.h" #include "cmSourceFile.h" @@ -40,18 +41,17 @@ bool cmFLTKWrapUICommand::InitialPass(std::vector<std::string> const& args, this->Makefile->AddIncludeDirectories(outputDirectories); } - for (std::vector<std::string>::const_iterator i = (args.begin() + 1); - i != args.end(); i++) { - cmSourceFile* curr = this->Makefile->GetSource(*i); + for (std::string const& arg : cmMakeRange(args).advance(1)) { + cmSourceFile* curr = this->Makefile->GetSource(arg); // if we should use the source GUI // to generate .cxx and .h files if (!curr || !curr->GetPropertyAsBool("WRAP_EXCLUDE")) { std::string outName = outputDirectory; outName += "/"; - outName += cmSystemTools::GetFilenameWithoutExtension(*i); + outName += cmSystemTools::GetFilenameWithoutExtension(arg); std::string hname = outName; hname += ".h"; - std::string origname = cdir + "/" + *i; + std::string origname = cdir + "/" + arg; // add starting depends std::vector<std::string> depends; depends.push_back(origname); |