summaryrefslogtreecommitdiffstats
path: root/Source/cmFileCommand.cxx
diff options
context:
space:
mode:
authorSebastian Holtermann <sebholt@xwmw.org>2019-08-18 11:58:04 (GMT)
committerSebastian Holtermann <sebholt@xwmw.org>2019-08-18 12:17:50 (GMT)
commitf1c529c4fbea1963f7df92597a350e066319a1e1 (patch)
treea544103f96e0b03a8b659d4d5767360ec05ff1cf /Source/cmFileCommand.cxx
parent34301441b963a2d7e02b4a4355a6634b3bbb7977 (diff)
downloadCMake-f1c529c4fbea1963f7df92597a350e066319a1e1.zip
CMake-f1c529c4fbea1963f7df92597a350e066319a1e1.tar.gz
CMake-f1c529c4fbea1963f7df92597a350e066319a1e1.tar.bz2
cmCryptoHash: Accept cm::string_view input
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 87e97dd..91e9a7b 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;