cmake: Don't lower-case a string needlessly.

This commit is contained in:
Stephen Kelly 2015-04-11 12:36:58 +02:00
parent 23368c9b83
commit c57f086a81
1 changed files with 1 additions and 1 deletions

View File

@ -243,12 +243,12 @@ void cmake::RenameCommand(const std::string& oldName,
{
// if the command already exists, free the old one
std::string sOldName = cmSystemTools::LowerCase(oldName);
std::string sNewName = cmSystemTools::LowerCase(newName);
RegisteredCommandsMap::iterator pos = this->Commands.find(sOldName);
if ( pos == this->Commands.end() )
{
return;
}
std::string sNewName = cmSystemTools::LowerCase(newName);
cmCommand* cmd = pos->second;
pos = this->Commands.find(sNewName);