cmFileCommand: remove an unnecessary cast

`cmCryptoHash::New` already returns a `unique_ptr`.
This commit is contained in:
Ben Boeckel authored and Brad King committed 2022-05-24 09:09:44 -04:00
1 parent b89c085237
commit 16e6e4e7dd
1 file changed
+1 -1
+1 -1
View File
@@ -1870,7 +1870,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));
hash = cmCryptoHash::New(algo);
if (!hash) {
std::string err =
cmStrCat("DOWNLOAD EXPECTED_HASH given unknown ALGO: ", algo);