diff options
author | Daniel Eiband <daniel.eiband@brainlab.com> | 2019-09-21 10:51:25 (GMT) |
---|---|---|
committer | Daniel Eiband <daniel.eiband@brainlab.com> | 2019-09-21 10:56:05 (GMT) |
commit | 61fdf326d8e762aaaef22d8ecce443674d5205e6 (patch) | |
tree | 0ec6e484670fc7d0d12a914be030dee80f55f179 /Source/cmState.cxx | |
parent | 0965bd9c064a5a595ca1bde01e8dba425ea2b916 (diff) | |
download | CMake-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.cxx | 2 |
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; } |