소스 검색

cmFileCommand: remove an unnecessary cast

`cmCryptoHash::New` already returns a `unique_ptr`.
Ben Boeckel 3 년 전
부모
커밋
16e6e4e7dd
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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);
       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);