Ver código fonte

cmFileCommand: remove an unnecessary cast

`cmCryptoHash::New` already returns a `unique_ptr`.
Ben Boeckel 3 anos atrás
pai
commit
16e6e4e7dd
1 arquivos alterados com 1 adições e 1 exclusões
  1. 1 1
      Source/cmFileCommand.cxx

+ 1 - 1
Source/cmFileCommand.cxx

@@ -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);