diff options
author | Brad King <brad.king@kitware.com> | 2024-01-18 22:18:10 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2024-01-18 22:40:32 (GMT) |
commit | 2352dcc830ca4be6ccf05f801241b158ac79e7d7 (patch) | |
tree | 5d100aad2d6ae2dc6c64d5d494201bf5c666259d /Source/cmImportedCxxModuleInfo.cxx | |
parent | c0734d550726e3abdb2a427b84ed2f5287b88fab (diff) | |
download | CMake-2352dcc830ca4be6ccf05f801241b158ac79e7d7.zip CMake-2352dcc830ca4be6ccf05f801241b158ac79e7d7.tar.gz CMake-2352dcc830ca4be6ccf05f801241b158ac79e7d7.tar.bz2 |
Source: Simplify hasher object construction
Diffstat (limited to 'Source/cmImportedCxxModuleInfo.cxx')
-rw-r--r-- | Source/cmImportedCxxModuleInfo.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Source/cmImportedCxxModuleInfo.cxx b/Source/cmImportedCxxModuleInfo.cxx index 9e3ac9a..c54b265 100644 --- a/Source/cmImportedCxxModuleInfo.cxx +++ b/Source/cmImportedCxxModuleInfo.cxx @@ -4,7 +4,6 @@ #include "cmImportedCxxModuleInfo.h" #include <cstddef> -#include <memory> #include <string> #include <utility> #include <vector> @@ -60,13 +59,13 @@ std::string ImportedCxxModuleLookup::BmiNameForSource(std::string const& path) auto importit = this->ImportedInfo.find(path); std::string bmiName; - auto hasher = cmCryptoHash::New("SHA3_512"); + cmCryptoHash hasher(cmCryptoHash::AlgoSHA3_512); constexpr size_t HASH_TRUNCATION = 12; if (importit != this->ImportedInfo.end()) { - auto safename = hasher->HashString(importit->second.Name); + auto safename = hasher.HashString(importit->second.Name); bmiName = cmStrCat(safename.substr(0, HASH_TRUNCATION), ".bmi"); } else { - auto dirhash = hasher->HashString(path); + auto dirhash = hasher.HashString(path); bmiName = cmStrCat(dirhash.substr(0, HASH_TRUNCATION), ".bmi"); } |