diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-04-11 10:44:18 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-04-12 18:08:49 (GMT) |
commit | 275185ac2b30b655b53100a129f5d7518ed943ad (patch) | |
tree | 42450b3bbe9904a33f57e9c63e4ccc8e5412973e | |
parent | c57f086a81c487fa88c36a785865d27b81e3cb8d (diff) | |
download | CMake-275185ac2b30b655b53100a129f5d7518ed943ad.zip CMake-275185ac2b30b655b53100a129f5d7518ed943ad.tar.gz CMake-275185ac2b30b655b53100a129f5d7518ed943ad.tar.bz2 |
cmake: Constify GetCommand method.
-rw-r--r-- | Source/cmake.cxx | 4 | ||||
-rw-r--r-- | Source/cmake.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 8868ef6..b27fefa 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -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; diff --git a/Source/cmake.h b/Source/cmake.h index a9f791d..c436c77 100644 --- a/Source/cmake.h +++ b/Source/cmake.h @@ -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; |