Browse Source

cmake: Remove method with no external users.

Port internal users to access the member.
Stephen Kelly 10 years ago
parent
commit
7450a2c6ed
2 changed files with 5 additions and 8 deletions
  1. 5 5
      Source/cmake.cxx
  2. 0 3
      Source/cmake.h

+ 5 - 5
Source/cmake.cxx

@@ -290,9 +290,9 @@ void cmake::AddCommand(cmCommand* wg)
 void cmake::RemoveUnscriptableCommands()
 {
   std::vector<std::string> unscriptableCommands;
-  cmake::RegisteredCommandsMap* commands = this->GetCommands();
-  for (cmake::RegisteredCommandsMap::const_iterator pos = commands->begin();
-       pos != commands->end();
+  for (cmake::RegisteredCommandsMap::const_iterator
+       pos = this->Commands.begin();
+       pos != this->Commands.end();
        ++pos)
     {
     if (!pos->second->IsScriptable())
@@ -2323,8 +2323,8 @@ const char *cmake::GetProperty(const std::string& prop,
   else if ( prop == "COMMANDS" )
     {
     cmake::RegisteredCommandsMap::iterator cmds
-        = this->GetCommands()->begin();
-    for (unsigned int cc=0 ; cmds != this->GetCommands()->end(); ++ cmds )
+        = this->Commands.begin();
+    for (unsigned int cc=0 ; cmds != this->Commands.end(); ++ cmds )
       {
       if ( cc > 0 )
         {

+ 0 - 3
Source/cmake.h

@@ -249,9 +249,6 @@ class cmake
    */
   cmCommand *GetCommand(const std::string& name);
 
-  /** Get list of all commands */
-  RegisteredCommandsMap* GetCommands() { return &this->Commands; }
-
   /** Check if a command exists. */
   bool CommandExists(const std::string& name) const;