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
+4 -2
View File
@@ -9,6 +9,8 @@
#include <string>
#include <vector>
#include "cm_memory.hxx"
#include "cmCommand.h"
class cmExecutionStatus;
@@ -28,9 +30,9 @@ public:
/**
* This is a virtual constructor for the command.
*/
cmCommand* Clone() override
std::unique_ptr<cmCommand> Clone() override
{
return new cmCMakeHostSystemInformationCommand;
return cm::make_unique<cmCMakeHostSystemInformationCommand>();
}
/**