summaryrefslogtreecommitdiffstats
path: root/Source/cmForEachCommand.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmForEachCommand.h')
-rw-r--r--Source/cmForEachCommand.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/Source/cmForEachCommand.h b/Source/cmForEachCommand.h
index 5131a4f..cd112b8 100644
--- a/Source/cmForEachCommand.h
+++ b/Source/cmForEachCommand.h
@@ -8,6 +8,8 @@
#include <string>
#include <vector>
+#include "cm_memory.hxx"
+
#include "cmCommand.h"
#include "cmFunctionBlocker.h"
#include "cmListFileCache.h"
@@ -39,7 +41,10 @@ public:
/**
* This is a virtual constructor for the command.
*/
- cmCommand* Clone() override { return new cmForEachCommand; }
+ std::unique_ptr<cmCommand> Clone() override
+ {
+ return cm::make_unique<cmForEachCommand>();
+ }
/**
* This is called when the command is first encountered in