cmake: Constify GetCommand method.

This commit is contained in:
Stephen Kelly committed 2015-04-12 20:08:49 +02:00
1 parent c57f086a81
commit 275185ac2b
2 files changed
+3 -3

No files matched your search

+2 -2
View File
@@ -226,11 +226,11 @@ bool cmake::CommandExists(const std::string& name) const
return (this->Commands.find(sName) != this->Commands.end());
}
cmCommand *cmake::GetCommand(const std::string& name)
cmCommand *cmake::GetCommand(const std::string& name) const
{
cmCommand* rm = 0;
std::string sName = cmSystemTools::LowerCase(name);
RegisteredCommandsMap::iterator pos = this->Commands.find(sName);
RegisteredCommandsMap::const_iterator pos = this->Commands.find(sName);
if (pos != this->Commands.end())
{
rm = (*pos).second;
+1 -1
View File
@@ -247,7 +247,7 @@ class cmake
/**
* Get a command by its name
*/
cmCommand *GetCommand(const std::string& name);
cmCommand *GetCommand(const std::string& name) const;
/** Check if a command exists. */
bool CommandExists(const std::string& name) const;