diff options
Diffstat (limited to 'Source/cmState.cxx')
-rw-r--r-- | Source/cmState.cxx | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Source/cmState.cxx b/Source/cmState.cxx index a93fb11..a57be4d 100644 --- a/Source/cmState.cxx +++ b/Source/cmState.cxx @@ -462,13 +462,17 @@ void cmState::AddScriptedCommand(std::string const& name, cmCommand* command) cmCommand* cmState::GetCommand(std::string const& name) const { - std::string sName = cmSystemTools::LowerCase(name); + return GetCommandByExactName(cmSystemTools::LowerCase(name)); +} + +cmCommand* cmState::GetCommandByExactName(std::string const& name) const +{ std::map<std::string, cmCommand*>::const_iterator pos; - pos = this->ScriptedCommands.find(sName); + pos = this->ScriptedCommands.find(name); if (pos != this->ScriptedCommands.end()) { return pos->second; } - pos = this->BuiltinCommands.find(sName); + pos = this->BuiltinCommands.find(name); if (pos != this->BuiltinCommands.end()) { return pos->second; } |