diff options
author | Matthias Maennich <matthias@maennich.net> | 2017-09-21 21:06:05 (GMT) |
---|---|---|
committer | Matthias Maennich <matthias@maennich.net> | 2017-09-25 22:07:19 (GMT) |
commit | f0489856e30b1b5236d1897071ea38dfde438fc7 (patch) | |
tree | f2a786e0c3fe5e9d234f62c3ca3cacfdbd70ef8f /Source/cmGraphVizWriter.cxx | |
parent | eae3765b67b653d3f00afa44a60719a387262af8 (diff) | |
download | CMake-f0489856e30b1b5236d1897071ea38dfde438fc7.zip CMake-f0489856e30b1b5236d1897071ea38dfde438fc7.tar.gz CMake-f0489856e30b1b5236d1897071ea38dfde438fc7.tar.bz2 |
Retire std::auto_ptr and its macro CM_AUTO_PTR
Signed-off-by: Matthias Maennich <matthias@maennich.net>
Diffstat (limited to 'Source/cmGraphVizWriter.cxx')
-rw-r--r-- | Source/cmGraphVizWriter.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Source/cmGraphVizWriter.cxx b/Source/cmGraphVizWriter.cxx index ca87cbf..dd2993d 100644 --- a/Source/cmGraphVizWriter.cxx +++ b/Source/cmGraphVizWriter.cxx @@ -4,6 +4,7 @@ #include <cstddef> #include <iostream> +#include <memory> // IWYU pragma: keep #include <sstream> #include <utility> @@ -15,7 +16,6 @@ #include "cmStateSnapshot.h" #include "cmSystemTools.h" #include "cmTarget.h" -#include "cm_auto_ptr.hxx" #include "cmake.h" namespace { @@ -147,8 +147,8 @@ void cmGraphVizWriter::ReadSettings(const char* settingsFileName, cm.SetHomeOutputDirectory(""); cm.GetCurrentSnapshot().SetDefaultDefinitions(); cmGlobalGenerator ggi(&cm); - CM_AUTO_PTR<cmMakefile> mf(new cmMakefile(&ggi, cm.GetCurrentSnapshot())); - CM_AUTO_PTR<cmLocalGenerator> lg(ggi.CreateLocalGenerator(mf.get())); + cmMakefile mf(&ggi, cm.GetCurrentSnapshot()); + std::unique_ptr<cmLocalGenerator> lg(ggi.CreateLocalGenerator(&mf)); const char* inFileName = settingsFileName; @@ -159,7 +159,7 @@ void cmGraphVizWriter::ReadSettings(const char* settingsFileName, } } - if (!mf->ReadListFile(inFileName)) { + if (!mf.ReadListFile(inFileName)) { cmSystemTools::Error("Problem opening GraphViz options file: ", inFileName); return; @@ -169,7 +169,7 @@ void cmGraphVizWriter::ReadSettings(const char* settingsFileName, #define __set_if_set(var, cmakeDefinition) \ { \ - const char* value = mf->GetDefinition(cmakeDefinition); \ + const char* value = mf.GetDefinition(cmakeDefinition); \ if (value) { \ (var) = value; \ } \ @@ -182,9 +182,9 @@ void cmGraphVizWriter::ReadSettings(const char* settingsFileName, #define __set_bool_if_set(var, cmakeDefinition) \ { \ - const char* value = mf->GetDefinition(cmakeDefinition); \ + const char* value = mf.GetDefinition(cmakeDefinition); \ if (value) { \ - (var) = mf->IsOn(cmakeDefinition); \ + (var) = mf.IsOn(cmakeDefinition); \ } \ } |