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/cmIncludeRegularExpressionCommand.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Source/cmIncludeRegularExpressionCommand.h') diff --git a/Source/cmIncludeRegularExpressionCommand.h b/Source/cmIncludeRegularExpressionCommand.h index 8da991d082..1723c8bb75 100644 --- a/Source/cmIncludeRegularExpressionCommand.h +++ b/Source/cmIncludeRegularExpressionCommand.h @@ -8,6 +8,8 @@ #include #include +#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 cmIncludeRegularExpressionCommand; } + std::unique_ptr Clone() override + { + return cm::make_unique(); + } /** * This is called when the command is first encountered in -- cgit v1.2.1