Retire std::auto_ptr and its macro CM_AUTO_PTR

Signed-off-by: Matthias Maennich <matthias@maennich.net>
This commit is contained in:
Matthias Maennich
2017-09-21 23:06:05 +02:00
parent eae3765b67
commit f0489856e3
54 changed files with 353 additions and 573 deletions
+5 -5
View File
@@ -6,6 +6,7 @@
#include <assert.h>
#include <iterator>
#include <map>
#include <memory> // IWYU pragma: keep
#include <set>
#include <sstream>
@@ -29,7 +30,6 @@
#include "cmStateSnapshot.h"
#include "cmStateTypes.h"
#include "cmSystemTools.h"
#include "cm_auto_ptr.hxx"
#include "cmake.h"
class cmCustomCommand;
@@ -241,7 +241,7 @@ void cmNinjaNormalTargetGenerator::WriteDeviceLinkRule(bool useResponseFile)
launcher += " ";
}
CM_AUTO_PTR<cmRulePlaceholderExpander> rulePlaceholderExpander(
std::unique_ptr<cmRulePlaceholderExpander> rulePlaceholderExpander(
this->GetLocalGenerator()->CreateRulePlaceholderExpander());
// Rule for linking library/executable.
@@ -365,7 +365,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkRule(bool useResponseFile)
launcher += " ";
}
CM_AUTO_PTR<cmRulePlaceholderExpander> rulePlaceholderExpander(
std::unique_ptr<cmRulePlaceholderExpander> rulePlaceholderExpander(
this->GetLocalGenerator()->CreateRulePlaceholderExpander());
// Rule for linking library/executable.
@@ -636,7 +636,7 @@ void cmNinjaNormalTargetGenerator::WriteDeviceLinkStatement()
vars["TARGET_FILE"] =
localGen.ConvertToOutputFormat(targetOutputReal, cmOutputConverter::SHELL);
CM_AUTO_PTR<cmLinkLineComputer> linkLineComputer(
std::unique_ptr<cmLinkLineComputer> linkLineComputer(
new cmNinjaLinkLineDeviceComputer(
this->GetLocalGenerator(),
this->GetLocalGenerator()->GetStateSnapshot().GetDirectory(),
@@ -839,7 +839,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
vars["TARGET_FILE"] =
localGen.ConvertToOutputFormat(targetOutputReal, cmOutputConverter::SHELL);
CM_AUTO_PTR<cmLinkLineComputer> linkLineComputer(
std::unique_ptr<cmLinkLineComputer> linkLineComputer(
this->GetGlobalGenerator()->CreateLinkLineComputer(
this->GetLocalGenerator(),
this->GetLocalGenerator()->GetStateSnapshot().GetDirectory()));