summaryrefslogtreecommitdiffstats
path: root/Source/cmMacroCommand.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmMacroCommand.cxx')
-rw-r--r--Source/cmMacroCommand.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/cmMacroCommand.cxx b/Source/cmMacroCommand.cxx
index 499d3c6..9f569e1 100644
--- a/Source/cmMacroCommand.cxx
+++ b/Source/cmMacroCommand.cxx
@@ -65,7 +65,7 @@ public:
/**
* The name of the command as specified in CMakeList.txt.
*/
- virtual const char* GetName() const { return this->Args[0].c_str(); }
+ virtual std::string GetName() const { return this->Args[0]; }
cmTypeMacro(cmMacroHelperCommand, cmCommand);
@@ -95,7 +95,7 @@ bool cmMacroHelperCommand::InvokeInitialPass
std::string errorMsg =
"Macro invoked with incorrect arguments for macro named: ";
errorMsg += this->Args[0];
- this->SetError(errorMsg.c_str());
+ this->SetError(errorMsg);
return false;
}
@@ -276,8 +276,8 @@ IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf,
f->Functions = this->Functions;
mf.RecordPolicies(f->Policies);
std::string newName = "_" + this->Args[0];
- mf.GetCMakeInstance()->RenameCommand(this->Args[0].c_str(),
- newName.c_str());
+ mf.GetCMakeInstance()->RenameCommand(this->Args[0],
+ newName);
mf.AddCommand(f);
// remove the function blocker now that the macro is defined