Commit 57dd094e authored by Stephen Kelly's avatar Stephen Kelly
Browse files

Use vector, not list for cmCommand storage.

parent 6deb43e6
......@@ -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);
......
......@@ -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);
......
......@@ -13,7 +13,7 @@
@COMMAND_INCLUDES@
void GetPredefinedCommands(std::list<cmCommand*>& commands)
void GetPredefinedCommands(std::vector<cmCommand*>& commands)
{
@NEW_COMMANDS@
}
......@@ -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
......@@ -11,6 +11,6 @@
============================================================================*/
#include "cmCommands.h"
void GetPredefinedCommands(std::list<cmCommand*>&)
void GetPredefinedCommands(std::vector<cmCommand*>&)
{
}
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment