From 57dd094eded03a94402b6eecf7027325bd7b5136 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Sun, 12 Apr 2015 02:44:41 +0200 Subject: [PATCH] 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 1b0abf498..118451432 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 e292a3a61..e522d8c79 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 f0745d780..e23bbd1e3 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 e90285386..7a94423a4 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 15b664eee..5f397a1fb 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 f62421455..1d067a596 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);