From 0c19f895d39b3302488acf9b6006fb524fb0e4d6 Mon Sep 17 00:00:00 2001 From: Pokechu22 Date: Fri, 10 Dec 2021 13:34:40 -0800 Subject: Replace remaining uses of zlib crc32 with Common/Hash.h --- Source/Core/DiscIO/VolumeVerifier.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'Source/Core/DiscIO/VolumeVerifier.cpp') diff --git a/Source/Core/DiscIO/VolumeVerifier.cpp b/Source/Core/DiscIO/VolumeVerifier.cpp index a31243c006..0a17864290 100644 --- a/Source/Core/DiscIO/VolumeVerifier.cpp +++ b/Source/Core/DiscIO/VolumeVerifier.cpp @@ -16,13 +16,13 @@ #include #include #include -#include #include "Common/Align.h" #include "Common/Assert.h" #include "Common/CommonPaths.h" #include "Common/CommonTypes.h" #include "Common/FileUtil.h" +#include "Common/Hash.h" #include "Common/HttpRequest.h" #include "Common/IOFile.h" #include "Common/Logging/Log.h" @@ -1041,7 +1041,7 @@ void VolumeVerifier::SetUpHashing() [](const GroupToVerify& a, const GroupToVerify& b) { return a.offset < b.offset; }); if (m_hashes_to_calculate.crc32) - m_crc32_context = crc32(0, nullptr, 0); + m_crc32_context = Common::StartCRC32(); if (m_hashes_to_calculate.md5) { @@ -1171,9 +1171,8 @@ void VolumeVerifier::Process() if (m_hashes_to_calculate.crc32) { m_crc32_future = std::async(std::launch::async, [this, byte_increment] { - // It would be nice to use crc32_z here instead of crc32, but it isn't available on Android m_crc32_context = - crc32(m_crc32_context, m_data.data(), static_cast(byte_increment)); + Common::UpdateCRC32(m_crc32_context, m_data.data(), static_cast(byte_increment)); }); } -- cgit v1.2.3