From 7450a2c6ed601dc94f2de410661065554ff8ce12 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Sat, 11 Apr 2015 14:16:47 +0200 Subject: cmake: Remove method with no external users. Port internal users to access the member. --- Source/cmake.cxx | 10 +++++----- Source/cmake.h | 3 --- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 99c12d6..d2331cb 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -290,9 +290,9 @@ void cmake::AddCommand(cmCommand* wg) void cmake::RemoveUnscriptableCommands() { std::vector 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 ) { diff --git a/Source/cmake.h b/Source/cmake.h index 3acf4a8..d2d3a85 100644 --- a/Source/cmake.h +++ b/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; -- cgit v0.12