diff --git a/src/common/sha1_digest.cpp b/src/common/sha1_digest.cpp index 72385e456..57cf2846b 100644 --- a/src/common/sha1_digest.cpp +++ b/src/common/sha1_digest.cpp @@ -160,7 +160,7 @@ void SHA1Digest::Reset() count[0] = count[1] = 0; } -std::string SHA1Digest::DigestToString(const std::span digest) +std::string SHA1Digest::DigestToString(const std::span digest) { std::string ret; ret.reserve(DIGEST_SIZE * 2); diff --git a/src/common/sha1_digest.h b/src/common/sha1_digest.h index 9fc0179dc..35adb3315 100644 --- a/src/common/sha1_digest.h +++ b/src/common/sha1_digest.h @@ -6,8 +6,8 @@ #include "types.h" #include -#include #include +#include class SHA1Digest { @@ -24,7 +24,7 @@ public: void Final(u8 digest[DIGEST_SIZE]); void Reset(); - static std::string DigestToString(const std::span digest); + static std::string DigestToString(const std::span digest); static std::array GetDigest(const void* data, size_t len); static std::array GetDigest(std::span data); diff --git a/src/common/small_string.cpp b/src/common/small_string.cpp index 619e5edc4..4a213b759 100644 --- a/src/common/small_string.cpp +++ b/src/common/small_string.cpp @@ -186,7 +186,7 @@ void SmallStringBase::append_hex(const void* data, size_t len, bool comma_separa if (len == 0) return; - static constexpr auto hex_char = [](char x) { return (x >= 0xA) ? ((x - 0xA) + 'a') : (x + '0'); }; + static constexpr auto hex_char = [](char x) { return static_cast((x >= 0xA) ? ((x - 0xA) + 'a') : (x + '0')); }; const u8* bytes = static_cast(data); if (!comma_separate) diff --git a/src/common/string_util.cpp b/src/common/string_util.cpp index 940b06a60..b5dce864d 100644 --- a/src/common/string_util.cpp +++ b/src/common/string_util.cpp @@ -171,7 +171,7 @@ std::optional> StringUtil::DecodeHex(const std::string_view in) std::string StringUtil::EncodeHex(const void* data, size_t length) { - static constexpr auto hex_char = [](char x) { return (x >= 0xA) ? ((x - 0xA) + 'a') : (x + '0'); }; + static constexpr auto hex_char = [](char x) { return static_cast((x >= 0xA) ? ((x - 0xA) + 'a') : (x + '0')); }; const u8* bytes = static_cast(data); diff --git a/src/util/gpu_device.cpp b/src/util/gpu_device.cpp index a0983788e..656464f47 100644 --- a/src/util/gpu_device.cpp +++ b/src/util/gpu_device.cpp @@ -491,9 +491,7 @@ bool GPUDevice::OpenPipelineCache(const std::string& path, Error* error) const size_t cache_size = data->size(); const std::array cache_hash = SHA1Digest::GetDigest(data->cspan()); - INFO_LOG("Loading {} byte pipeline cache with hash {}", s_pipeline_cache_size, - SHA1Digest::DigestToString(s_pipeline_cache_hash)); - + INFO_LOG("Loading {} byte pipeline cache with hash {}", cache_size, SHA1Digest::DigestToString(cache_hash)); if (!ReadPipelineCache(std::move(data.value()), error)) return false;