mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-04 12:49:36 -06:00
modernize: manage cmCommand instances using unique_ptr.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user