modernize: manage cmCommand instances using unique_ptr.

This commit is contained in:
Marc Chevrier
2019-07-04 18:14:22 +02:00
parent d9b2c7dae2
commit 1591f138f1
136 changed files with 1014 additions and 399 deletions

View File

@@ -8,6 +8,8 @@
#include <string>
#include <vector>
#include "cm_memory.hxx"
#include "cmCommand.h"
class cmExecutionStatus;
@@ -24,7 +26,10 @@ public:
/**
* This is a virtual constructor for the command.
*/
cmCommand* Clone() override { return new cmAddExecutableCommand; }
std::unique_ptr<cmCommand> Clone() override
{
return cm::make_unique<cmAddExecutableCommand>();
}
/**
* This is called when the command is first encountered in