summaryrefslogtreecommitdiffstats
path: root/Source/cmForEachCommand.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-09-27 11:24:26 (GMT)
committerKitware Robot <kwrobot@kitware.com>2017-09-27 11:25:11 (GMT)
commit068effa4d8ad2813499a6e79b056d79a2120e1ad (patch)
tree008fcbf88c2f6813542e83fb37a95e45c807b2d4 /Source/cmForEachCommand.cxx
parentbb371753cb1d35c68060298ae5be6697144c9403 (diff)
parentf0489856e30b1b5236d1897071ea38dfde438fc7 (diff)
downloadCMake-068effa4d8ad2813499a6e79b056d79a2120e1ad.zip
CMake-068effa4d8ad2813499a6e79b056d79a2120e1ad.tar.gz
CMake-068effa4d8ad2813499a6e79b056d79a2120e1ad.tar.bz2
Merge topic 'auto_ptr'
f0489856 Retire std::auto_ptr and its macro CM_AUTO_PTR Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Pavel Solodovnikov <hellyeahdominate@gmail.com> Merge-request: !1300
Diffstat (limited to 'Source/cmForEachCommand.cxx')
-rw-r--r--Source/cmForEachCommand.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/Source/cmForEachCommand.cxx b/Source/cmForEachCommand.cxx
index 37387b0..542a860 100644
--- a/Source/cmForEachCommand.cxx
+++ b/Source/cmForEachCommand.cxx
@@ -2,6 +2,7 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmForEachCommand.h"
+#include <memory> // IWYU pragma: keep
#include <sstream>
#include <stdio.h>
#include <stdlib.h>
@@ -9,7 +10,6 @@
#include "cmExecutionStatus.h"
#include "cmMakefile.h"
#include "cmSystemTools.h"
-#include "cm_auto_ptr.hxx"
#include "cmake.h"
cmForEachFunctionBlocker::cmForEachFunctionBlocker(cmMakefile* mf)
@@ -35,7 +35,8 @@ bool cmForEachFunctionBlocker::IsFunctionBlocked(const cmListFileFunction& lff,
// if this is the endofreach for this statement
if (!this->Depth) {
// Remove the function blocker for this scope or bail.
- CM_AUTO_PTR<cmFunctionBlocker> fb(mf.RemoveFunctionBlocker(this, lff));
+ std::unique_ptr<cmFunctionBlocker> fb(
+ mf.RemoveFunctionBlocker(this, lff));
if (!fb.get()) {
return false;
}
@@ -181,7 +182,7 @@ bool cmForEachCommand::InitialPass(std::vector<std::string> const& args,
bool cmForEachCommand::HandleInMode(std::vector<std::string> const& args)
{
- CM_AUTO_PTR<cmForEachFunctionBlocker> f(
+ std::unique_ptr<cmForEachFunctionBlocker> f(
new cmForEachFunctionBlocker(this->Makefile));
f->Args.push_back(args[0]);
@@ -213,7 +214,7 @@ bool cmForEachCommand::HandleInMode(std::vector<std::string> const& args)
}
}
- this->Makefile->AddFunctionBlocker(f.release()); // TODO: pass auto_ptr
+ this->Makefile->AddFunctionBlocker(f.release()); // TODO: pass unique_ptr
return true;
}