Selaa lähdekoodia

cmState: Avoid lowering command name twice

The given command given to GetCommand is already lower case so we can use
GetCommandByExactName directly.
Daniel Eiband 6 vuotta sitten
vanhempi
sitoutus
61fdf326d8
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      Source/cmState.cxx

+ 1 - 1
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;
   }