From 1591f138f1a40fccdde7fb2796ee2d2d8f3f97bb Mon Sep 17 00:00:00 2001 From: Marc Chevrier Date: Thu, 4 Jul 2019 18:14:22 +0200 Subject: modernize: manage cmCommand instances using unique_ptr. --- Source/cmMessageCommand.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Source/cmMessageCommand.h') diff --git a/Source/cmMessageCommand.h b/Source/cmMessageCommand.h index 819ebdacfd..ef89d59f54 100644 --- a/Source/cmMessageCommand.h +++ b/Source/cmMessageCommand.h @@ -8,6 +8,8 @@ #include #include +#include "cm_memory.hxx" + #include "cmCommand.h" class cmExecutionStatus; @@ -22,7 +24,10 @@ public: /** * This is a virtual constructor for the command. */ - cmCommand* Clone() override { return new cmMessageCommand; } + std::unique_ptr Clone() override + { + return cm::make_unique(); + } /** * This is called when the command is first encountered in -- cgit v1.2.1