summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-04-12 00:44:41 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-04-12 18:09:47 (GMT)
commit57dd094eded03a94402b6eecf7027325bd7b5136 (patch)
treec0690faf3bb1a2772344502e9ca8934fa625c53a
parent6deb43e6c836a61536c3d6e36ca16b51013e9134 (diff)
downloadCMake-57dd094eded03a94402b6eecf7027325bd7b5136.zip
CMake-57dd094eded03a94402b6eecf7027325bd7b5136.tar.gz
CMake-57dd094eded03a94402b6eecf7027325bd7b5136.tar.bz2
Use vector, not list for cmCommand storage.
-rw-r--r--Source/cmBootstrapCommands1.cxx2
-rw-r--r--Source/cmBootstrapCommands2.cxx2
-rw-r--r--Source/cmCommands.cxx.in2
-rw-r--r--Source/cmCommands.h8
-rw-r--r--Source/cmCommandsForBootstrap.cxx2
-rw-r--r--Source/cmake.cxx4
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<cmCommand*>& commands)
+void GetBootstrapCommands1(std::vector<cmCommand*>& 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<cmCommand*>& commands)
+void GetBootstrapCommands2(std::vector<cmCommand*>& 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<cmCommand*>& commands)
+void GetPredefinedCommands(std::vector<cmCommand*>& 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 <list>
+#include <vector>
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<cmCommand*>& commands);
-void GetBootstrapCommands2(std::list<cmCommand*>& commands);
-void GetPredefinedCommands(std::list<cmCommand*>& commands);
+void GetBootstrapCommands1(std::vector<cmCommand*>& commands);
+void GetBootstrapCommands2(std::vector<cmCommand*>& commands);
+void GetPredefinedCommands(std::vector<cmCommand*>& 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<cmCommand*>&)
+void GetPredefinedCommands(std::vector<cmCommand*>&)
{
}
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<cmCommand*> commands;
+ std::vector<cmCommand*> commands;
GetBootstrapCommands1(commands);
GetBootstrapCommands2(commands);
GetPredefinedCommands(commands);
- for(std::list<cmCommand*>::iterator i = commands.begin();
+ for(std::vector<cmCommand*>::iterator i = commands.begin();
i != commands.end(); ++i)
{
this->AddCommand(*i);