mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-26 18:58:34 -06:00
cmFileCommand: remove an unnecessary cast
`cmCryptoHash::New` already returns a `unique_ptr`.
This commit is contained in:
@@ -1870,7 +1870,7 @@ bool HandleDownloadCommand(std::vector<std::string> const& args,
|
|||||||
}
|
}
|
||||||
std::string algo = i->substr(0, pos);
|
std::string algo = i->substr(0, pos);
|
||||||
expectedHash = cmSystemTools::LowerCase(i->substr(pos + 1));
|
expectedHash = cmSystemTools::LowerCase(i->substr(pos + 1));
|
||||||
hash = std::unique_ptr<cmCryptoHash>(cmCryptoHash::New(algo));
|
hash = cmCryptoHash::New(algo);
|
||||||
if (!hash) {
|
if (!hash) {
|
||||||
std::string err =
|
std::string err =
|
||||||
cmStrCat("DOWNLOAD EXPECTED_HASH given unknown ALGO: ", algo);
|
cmStrCat("DOWNLOAD EXPECTED_HASH given unknown ALGO: ", algo);
|
||||||
|
|||||||
Reference in New Issue
Block a user