From 61fdf326d8e762aaaef22d8ecce443674d5205e6 Mon Sep 17 00:00:00 2001 From: Daniel Eiband Date: Sat, 21 Sep 2019 12:51:25 +0200 Subject: cmState: Avoid lowering command name twice The given command given to GetCommand is already lower case so we can use GetCommandByExactName directly. --- Source/cmState.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- cgit v0.12