summaryrefslogtreecommitdiffstats
path: root/Source/cmState.cxx
diff options
context:
space:
mode:
authorDaniel Eiband <daniel.eiband@brainlab.com>2019-09-21 10:51:25 (GMT)
committerDaniel Eiband <daniel.eiband@brainlab.com>2019-09-21 10:56:05 (GMT)
commit61fdf326d8e762aaaef22d8ecce443674d5205e6 (patch)
tree0ec6e484670fc7d0d12a914be030dee80f55f179 /Source/cmState.cxx
parent0965bd9c064a5a595ca1bde01e8dba425ea2b916 (diff)
downloadCMake-61fdf326d8e762aaaef22d8ecce443674d5205e6.zip
CMake-61fdf326d8e762aaaef22d8ecce443674d5205e6.tar.gz
CMake-61fdf326d8e762aaaef22d8ecce443674d5205e6.tar.bz2
cmState: Avoid lowering command name twice
The given command given to GetCommand is already lower case so we can use GetCommandByExactName directly.
Diffstat (limited to 'Source/cmState.cxx')
-rw-r--r--Source/cmState.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmState.cxx b/Source/cmState.cxx
index 93ad2d7..6de312c 100644
--- a/Source/cmState.cxx
+++ b/Source/cmState.cxx
@@ -503,7 +503,7 @@ void cmState::AddScriptedCommand(std::string const& name, Command command)
std::string sName = cmSystemTools::LowerCase(name);
// if the command already exists, give a new name to the old command.
- if (Command oldCmd = this->GetCommand(sName)) {
+ if (Command oldCmd = this->GetCommandByExactName(sName)) {
this->ScriptedCommands["_" + sName] = oldCmd;
}