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/cmStringCommand.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/cmStringCommand.cxx')
-rw-r--r-- | Source/cmStringCommand.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/cmStringCommand.cxx b/Source/cmStringCommand.cxx index 3b6a7ee..55af078 100644 --- a/Source/cmStringCommand.cxx +++ b/Source/cmStringCommand.cxx @@ -4,6 +4,7 @@ #include "cmsys/RegularExpression.hxx" #include <ctype.h> +#include <memory> // IWYU pragma: keep #include <sstream> #include <stdio.h> #include <stdlib.h> @@ -15,7 +16,6 @@ #include "cmSystemTools.h" #include "cmTimestamp.h" #include "cmUuid.h" -#include "cm_auto_ptr.hxx" class cmExecutionStatus; @@ -108,8 +108,8 @@ bool cmStringCommand::HandleHashCommand(std::vector<std::string> const& args) return false; } - CM_AUTO_PTR<cmCryptoHash> hash(cmCryptoHash::New(args[0].c_str())); - if (hash.get()) { + std::unique_ptr<cmCryptoHash> hash(cmCryptoHash::New(args[0].c_str())); + if (hash) { std::string out = hash->HashString(args[2]); this->Makefile->AddDefinition(args[1], out.c_str()); return true; |