diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-01-18 16:10:03 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-02-05 19:44:25 (GMT) |
commit | bd990c803b40e1532cab6b29c75414ca6f30e782 (patch) | |
tree | 6e724661a3b4e195b3d437cf11053f797b8d9bcf | |
parent | 5fc53f1edb2d003595ef224b31a805c3af0dc0e6 (diff) | |
download | CMake-bd990c803b40e1532cab6b29c75414ca6f30e782.zip CMake-bd990c803b40e1532cab6b29c75414ca6f30e782.tar.gz CMake-bd990c803b40e1532cab6b29c75414ca6f30e782.tar.bz2 |
Remove use of ExpandSourceListArguments.
By now, it is only an expensive copy.
-rw-r--r-- | Source/cmCPluginAPI.cxx | 7 | ||||
-rw-r--r-- | Source/cmFLTKWrapUICommand.cxx | 7 | ||||
-rw-r--r-- | Source/cmInstallFilesCommand.cxx | 7 | ||||
-rw-r--r-- | Source/cmQTWrapCPPCommand.cxx | 10 | ||||
-rw-r--r-- | Source/cmQTWrapUICommand.cxx | 10 |
5 files changed, 13 insertions, 28 deletions
diff --git a/Source/cmCPluginAPI.cxx b/Source/cmCPluginAPI.cxx index d0dc30a..691d80d 100644 --- a/Source/cmCPluginAPI.cxx +++ b/Source/cmCPluginAPI.cxx @@ -438,15 +438,14 @@ void CCONV cmExpandSourceListArguments(void *arg, char ***resArgv, unsigned int startArgumentIndex) { - cmMakefile *mf = static_cast<cmMakefile *>(arg); + (void)arg; + (void)startArgumentIndex; std::vector<std::string> result; - std::vector<std::string> args2; int i; for (i = 0; i < numArgs; ++i) { - args2.push_back(args[i]); + result.push_back(args[i]); } - mf->ExpandSourceListArguments(args2, result, startArgumentIndex); int resargc = static_cast<int>(result.size()); char **resargv = 0; if (resargc) diff --git a/Source/cmFLTKWrapUICommand.cxx b/Source/cmFLTKWrapUICommand.cxx index f7d8243..488beaa 100644 --- a/Source/cmFLTKWrapUICommand.cxx +++ b/Source/cmFLTKWrapUICommand.cxx @@ -31,9 +31,6 @@ bool cmFLTKWrapUICommand // get parameter for the command this->Target = args[0]; // Target that will use the generated files - std::vector<std::string> newArgs; - this->Makefile->ExpandSourceListArguments(args,newArgs, 1); - // get the list of GUI files from which .cxx and .h will be generated std::string outputDirectory = this->Makefile->GetCurrentOutputDirectory(); @@ -45,8 +42,8 @@ bool cmFLTKWrapUICommand this->Makefile->AddIncludeDirectories( outputDirectories ); } - for(std::vector<std::string>::iterator i = (newArgs.begin() + 1); - i != newArgs.end(); i++) + for(std::vector<std::string>::const_iterator i = (args.begin() + 1); + i != args.end(); i++) { cmSourceFile *curr = this->Makefile->GetSource(*i); // if we should use the source GUI diff --git a/Source/cmInstallFilesCommand.cxx b/Source/cmInstallFilesCommand.cxx index 06a78e5..85e5345 100644 --- a/Source/cmInstallFilesCommand.cxx +++ b/Source/cmInstallFilesCommand.cxx @@ -15,9 +15,9 @@ // cmExecutableCommand bool cmInstallFilesCommand -::InitialPass(std::vector<std::string> const& argsIn, cmExecutionStatus &) +::InitialPass(std::vector<std::string> const& args, cmExecutionStatus &) { - if(argsIn.size() < 2) + if(args.size() < 2) { this->SetError("called with incorrect number of arguments"); return false; @@ -27,9 +27,6 @@ bool cmInstallFilesCommand this->Makefile->GetLocalGenerator() ->GetGlobalGenerator()->EnableInstallTarget(); - std::vector<std::string> args; - this->Makefile->ExpandSourceListArguments(argsIn, args, 2); - this->Destination = args[0]; if((args.size() > 1) && (args[1] == "FILES")) diff --git a/Source/cmQTWrapCPPCommand.cxx b/Source/cmQTWrapCPPCommand.cxx index a984260..878562c 100644 --- a/Source/cmQTWrapCPPCommand.cxx +++ b/Source/cmQTWrapCPPCommand.cxx @@ -12,19 +12,15 @@ #include "cmQTWrapCPPCommand.h" // cmQTWrapCPPCommand -bool cmQTWrapCPPCommand::InitialPass(std::vector<std::string> const& argsIn, +bool cmQTWrapCPPCommand::InitialPass(std::vector<std::string> const& args, cmExecutionStatus &) { - if(argsIn.size() < 3 ) + if(args.size() < 3 ) { this->SetError("called with incorrect number of arguments"); return false; } - // This command supports source list inputs for compatibility. - std::vector<std::string> args; - this->Makefile->ExpandSourceListArguments(argsIn, args, 2); - // Get the moc executable to run in the custom command. const char* moc_exe = this->Makefile->GetRequiredDefinition("QT_MOC_EXECUTABLE"); @@ -35,7 +31,7 @@ bool cmQTWrapCPPCommand::InitialPass(std::vector<std::string> const& argsIn, this->Makefile->GetSafeDefinition(sourceList); // Create a rule for all sources listed. - for(std::vector<std::string>::iterator j = (args.begin() + 2); + for(std::vector<std::string>::const_iterator j = (args.begin() + 2); j != args.end(); ++j) { cmSourceFile *curr = this->Makefile->GetSource(*j); diff --git a/Source/cmQTWrapUICommand.cxx b/Source/cmQTWrapUICommand.cxx index dce59ef..9b92b1e 100644 --- a/Source/cmQTWrapUICommand.cxx +++ b/Source/cmQTWrapUICommand.cxx @@ -12,19 +12,15 @@ #include "cmQTWrapUICommand.h" // cmQTWrapUICommand -bool cmQTWrapUICommand::InitialPass(std::vector<std::string> const& argsIn, +bool cmQTWrapUICommand::InitialPass(std::vector<std::string> const& args, cmExecutionStatus &) { - if(argsIn.size() < 4 ) + if(args.size() < 4 ) { this->SetError("called with incorrect number of arguments"); return false; } - // This command supports source list inputs for compatibility. - std::vector<std::string> args; - this->Makefile->ExpandSourceListArguments(argsIn, args, 3); - // Get the uic and moc executables to run in the custom commands. const char* uic_exe = this->Makefile->GetRequiredDefinition("QT_UIC_EXECUTABLE"); @@ -40,7 +36,7 @@ bool cmQTWrapUICommand::InitialPass(std::vector<std::string> const& argsIn, this->Makefile->GetSafeDefinition(sourceList); // Create rules for all sources listed. - for(std::vector<std::string>::iterator j = (args.begin() + 3); + for(std::vector<std::string>::const_iterator j = (args.begin() + 3); j != args.end(); ++j) { cmSourceFile *curr = this->Makefile->GetSource(*j); |