From b2f51059cc034f03c70df28a5597a591ed3e5c5d Mon Sep 17 00:00:00 2001 From: Maksim Denisov Date: Wed, 17 Jul 2024 12:57:28 +0200 Subject: Create Hasher using a static function --- src/other_tools/utils/content.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/other_tools/utils/content.hpp') diff --git a/src/other_tools/utils/content.hpp b/src/other_tools/utils/content.hpp index 31dd7fc1..eb6aca76 100644 --- a/src/other_tools/utils/content.hpp +++ b/src/other_tools/utils/content.hpp @@ -89,9 +89,9 @@ template [[nodiscard]] static auto GetContentHash(std::string const& data) noexcept -> std::string { - Hasher hasher{type}; - hasher.Update(data); - auto digest = std::move(hasher).Finalize(); + auto hasher = Hasher::Create(type); + hasher->Update(data); + auto digest = std::move(*hasher).Finalize(); return digest.HexString(); } -- cgit v1.2.3