Use vector, not list for cmCommand storage.
This commit is contained in:
parent
6deb43e6c8
commit
57dd094ede
|
@ -55,7 +55,7 @@
|
||||||
#include "cmPathLabel.cxx"
|
#include "cmPathLabel.cxx"
|
||||||
#include "cmSearchPath.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 cmAddCustomCommandCommand);
|
||||||
commands.push_back(new cmAddCustomTargetCommand);
|
commands.push_back(new cmAddCustomTargetCommand);
|
||||||
|
|
|
@ -59,7 +59,7 @@
|
||||||
#include "cmUnsetCommand.cxx"
|
#include "cmUnsetCommand.cxx"
|
||||||
#include "cmWhileCommand.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 cmGetCMakePropertyCommand);
|
||||||
commands.push_back(new cmGetDirectoryPropertyCommand);
|
commands.push_back(new cmGetDirectoryPropertyCommand);
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
@COMMAND_INCLUDES@
|
@COMMAND_INCLUDES@
|
||||||
|
|
||||||
void GetPredefinedCommands(std::list<cmCommand*>& commands)
|
void GetPredefinedCommands(std::vector<cmCommand*>& commands)
|
||||||
{
|
{
|
||||||
@NEW_COMMANDS@
|
@NEW_COMMANDS@
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
#define cmCommands_h
|
#define cmCommands_h
|
||||||
#include "cmStandardIncludes.h"
|
#include "cmStandardIncludes.h"
|
||||||
|
|
||||||
#include <list>
|
#include <vector>
|
||||||
|
|
||||||
class cmCommand;
|
class cmCommand;
|
||||||
/**
|
/**
|
||||||
|
@ -23,9 +23,9 @@ class cmCommand;
|
||||||
* It is up to the caller to delete the commands created by this
|
* It is up to the caller to delete the commands created by this
|
||||||
* call.
|
* call.
|
||||||
*/
|
*/
|
||||||
void GetBootstrapCommands1(std::list<cmCommand*>& commands);
|
void GetBootstrapCommands1(std::vector<cmCommand*>& commands);
|
||||||
void GetBootstrapCommands2(std::list<cmCommand*>& commands);
|
void GetBootstrapCommands2(std::vector<cmCommand*>& commands);
|
||||||
void GetPredefinedCommands(std::list<cmCommand*>& commands);
|
void GetPredefinedCommands(std::vector<cmCommand*>& commands);
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -11,6 +11,6 @@
|
||||||
============================================================================*/
|
============================================================================*/
|
||||||
#include "cmCommands.h"
|
#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()
|
void cmake::AddDefaultCommands()
|
||||||
{
|
{
|
||||||
std::list<cmCommand*> commands;
|
std::vector<cmCommand*> commands;
|
||||||
GetBootstrapCommands1(commands);
|
GetBootstrapCommands1(commands);
|
||||||
GetBootstrapCommands2(commands);
|
GetBootstrapCommands2(commands);
|
||||||
GetPredefinedCommands(commands);
|
GetPredefinedCommands(commands);
|
||||||
for(std::list<cmCommand*>::iterator i = commands.begin();
|
for(std::vector<cmCommand*>::iterator i = commands.begin();
|
||||||
i != commands.end(); ++i)
|
i != commands.end(); ++i)
|
||||||
{
|
{
|
||||||
this->AddCommand(*i);
|
this->AddCommand(*i);
|
||||||
|
|
Loading…
Reference in New Issue