summaryrefslogtreecommitdiffstats
path: root/Source/cmFileCommand.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-08-19 19:04:09 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-08-19 19:05:27 (GMT)
commit0b8524baa68944ee148c8b48b4ee937ab315175d (patch)
tree77b920b381709c457fbe9ac81b716cf6248d4521 /Source/cmFileCommand.cxx
parent0f914b7f26b80163c86cd07959d0f32912ce2fcc (diff)
parentf1c529c4fbea1963f7df92597a350e066319a1e1 (diff)
downloadCMake-0b8524baa68944ee148c8b48b4ee937ab315175d.zip
CMake-0b8524baa68944ee148c8b48b4ee937ab315175d.tar.gz
CMake-0b8524baa68944ee148c8b48b4ee937ab315175d.tar.bz2
Merge topic 'cmCryptoHash_string_view'
f1c529c4fb cmCryptoHash: Accept cm::string_view input Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3697
Diffstat (limited to 'Source/cmFileCommand.cxx')
-rw-r--r--Source/cmFileCommand.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx
index f618002..67ae1e6 100644
--- a/Source/cmFileCommand.cxx
+++ b/Source/cmFileCommand.cxx
@@ -283,7 +283,7 @@ bool HandleHashCommand(std::vector<std::string> const& args,
return false;
}
- std::unique_ptr<cmCryptoHash> hash(cmCryptoHash::New(args[0].c_str()));
+ std::unique_ptr<cmCryptoHash> hash(cmCryptoHash::New(args[0]));
if (hash) {
std::string out = hash->HashFile(args[1]);
if (!out.empty()) {
@@ -1712,7 +1712,7 @@ bool HandleDownloadCommand(std::vector<std::string> const& args,
}
std::string algo = i->substr(0, pos);
expectedHash = cmSystemTools::LowerCase(i->substr(pos + 1));
- hash = std::unique_ptr<cmCryptoHash>(cmCryptoHash::New(algo.c_str()));
+ hash = std::unique_ptr<cmCryptoHash>(cmCryptoHash::New(algo));
if (!hash) {
std::string err = "DOWNLOAD EXPECTED_HASH given unknown ALGO: ";
err += algo;