diff options
Diffstat (limited to 'Source/cmForEachCommand.cxx')
-rw-r--r-- | Source/cmForEachCommand.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Source/cmForEachCommand.cxx b/Source/cmForEachCommand.cxx index d697067..e3f66c1 100644 --- a/Source/cmForEachCommand.cxx +++ b/Source/cmForEachCommand.cxx @@ -35,9 +35,9 @@ IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf, // at end of for each execute recorded commands // store the old value std::string oldDef; - if (mf.GetDefinition(this->Args[0].c_str())) + if (mf.GetDefinition(this->Args[0])) { - oldDef = mf.GetDefinition(this->Args[0].c_str()); + oldDef = mf.GetDefinition(this->Args[0]); } std::vector<std::string>::const_iterator j = this->Args.begin(); ++j; @@ -47,7 +47,7 @@ IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf, for( ; j != this->Args.end(); ++j) { // set the variable to the loop value - mf.AddDefinition(this->Args[0].c_str(),j->c_str()); + mf.AddDefinition(this->Args[0],j->c_str()); // Invoke all the functions that were collected in the block. cmExecutionStatus status; for(unsigned int c = 0; c < this->Functions.size(); ++c) @@ -58,13 +58,13 @@ IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf, { inStatus.SetReturnInvoked(true); // restore the variable to its prior value - mf.AddDefinition(this->Args[0].c_str(),oldDef.c_str()); + mf.AddDefinition(this->Args[0],oldDef.c_str()); return true; } if (status.GetBreakInvoked()) { // restore the variable to its prior value - mf.AddDefinition(this->Args[0].c_str(),oldDef.c_str()); + mf.AddDefinition(this->Args[0],oldDef.c_str()); return true; } if(cmSystemTools::GetFatalErrorOccured() ) @@ -74,7 +74,7 @@ IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf, } } // restore the variable to its prior value - mf.AddDefinition(this->Args[0].c_str(),oldDef.c_str()); + mf.AddDefinition(this->Args[0],oldDef.c_str()); return true; } else @@ -166,7 +166,7 @@ bool cmForEachCommand cmOStringStream str; str << "called with incorrect range specification: start "; str << start << ", stop " << stop << ", step " << step; - this->SetError(str.str().c_str()); + this->SetError(str.str()); return false; } std::vector<std::string> range; @@ -226,7 +226,7 @@ bool cmForEachCommand::HandleInMode(std::vector<std::string> const& args) } else if(doing == DoingLists) { - const char* value = this->Makefile->GetDefinition(args[i].c_str()); + const char* value = this->Makefile->GetDefinition(args[i]); if(value && *value) { cmSystemTools::ExpandListArgument(value, f->Args, true); |