From 57dd094eded03a94402b6eecf7027325bd7b5136 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Sun, 12 Apr 2015 02:44:41 +0200 Subject: Use vector, not list for cmCommand storage. --- Source/cmBootstrapCommands1.cxx | 2 +- Source/cmBootstrapCommands2.cxx | 2 +- Source/cmCommands.cxx.in | 2 +- Source/cmCommands.h | 8 ++++---- Source/cmCommandsForBootstrap.cxx | 2 +- Source/cmake.cxx | 4 ++-- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Source/cmBootstrapCommands1.cxx b/Source/cmBootstrapCommands1.cxx index 1b0abf4..1184514 100644 --- a/Source/cmBootstrapCommands1.cxx +++ b/Source/cmBootstrapCommands1.cxx @@ -55,7 +55,7 @@ #include "cmPathLabel.cxx" #include "cmSearchPath.cxx" -void GetBootstrapCommands1(std::list& commands) +void GetBootstrapCommands1(std::vector& commands) { commands.push_back(new cmAddCustomCommandCommand); commands.push_back(new cmAddCustomTargetCommand); diff --git a/Source/cmBootstrapCommands2.cxx b/Source/cmBootstrapCommands2.cxx index e292a3a..e522d8c 100644 --- a/Source/cmBootstrapCommands2.cxx +++ b/Source/cmBootstrapCommands2.cxx @@ -59,7 +59,7 @@ #include "cmUnsetCommand.cxx" #include "cmWhileCommand.cxx" -void GetBootstrapCommands2(std::list& commands) +void GetBootstrapCommands2(std::vector& commands) { commands.push_back(new cmGetCMakePropertyCommand); commands.push_back(new cmGetDirectoryPropertyCommand); diff --git a/Source/cmCommands.cxx.in b/Source/cmCommands.cxx.in index f0745d7..e23bbd1 100644 --- a/Source/cmCommands.cxx.in +++ b/Source/cmCommands.cxx.in @@ -13,7 +13,7 @@ @COMMAND_INCLUDES@ -void GetPredefinedCommands(std::list& commands) +void GetPredefinedCommands(std::vector& commands) { @NEW_COMMANDS@ } diff --git a/Source/cmCommands.h b/Source/cmCommands.h index e902853..7a94423 100644 --- a/Source/cmCommands.h +++ b/Source/cmCommands.h @@ -13,7 +13,7 @@ #define cmCommands_h #include "cmStandardIncludes.h" -#include +#include class cmCommand; /** @@ -23,9 +23,9 @@ class cmCommand; * It is up to the caller to delete the commands created by this * call. */ -void GetBootstrapCommands1(std::list& commands); -void GetBootstrapCommands2(std::list& commands); -void GetPredefinedCommands(std::list& commands); +void GetBootstrapCommands1(std::vector& commands); +void GetBootstrapCommands2(std::vector& commands); +void GetPredefinedCommands(std::vector& commands); #endif diff --git a/Source/cmCommandsForBootstrap.cxx b/Source/cmCommandsForBootstrap.cxx index 15b664e..5f397a1 100644 --- a/Source/cmCommandsForBootstrap.cxx +++ b/Source/cmCommandsForBootstrap.cxx @@ -11,6 +11,6 @@ ============================================================================*/ #include "cmCommands.h" -void GetPredefinedCommands(std::list&) +void GetPredefinedCommands(std::vector&) { } diff --git a/Source/cmake.cxx b/Source/cmake.cxx index f624214..1d067a5 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -1804,11 +1804,11 @@ const char* cmake::GetCacheDefinition(const std::string& name) const void cmake::AddDefaultCommands() { - std::list commands; + std::vector commands; GetBootstrapCommands1(commands); GetBootstrapCommands2(commands); GetPredefinedCommands(commands); - for(std::list::iterator i = commands.begin(); + for(std::vector::iterator i = commands.begin(); i != commands.end(); ++i) { this->AddCommand(*i); -- cgit v0.12