diff options
| author | Pokechu22 <Pokechu022@gmail.com> | 2021-12-10 13:34:40 -0800 |
|---|---|---|
| committer | Pokechu22 <Pokechu022@gmail.com> | 2022-01-01 10:36:38 -0800 |
| commit | 0c19f895d39b3302488acf9b6006fb524fb0e4d6 (patch) | |
| tree | 8e2981a8ad07c4a97535516c6a1111823f3c0c92 /Source/Core/DiscIO/VolumeVerifier.cpp | |
| parent | 2652aed85c0ab0ee9d51cfd5065b4bb4a620ab45 (diff) | |
Replace remaining uses of zlib crc32 with Common/Hash.h
Diffstat (limited to 'Source/Core/DiscIO/VolumeVerifier.cpp')
| -rw-r--r-- | Source/Core/DiscIO/VolumeVerifier.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
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 <mbedtls/sha1.h> #include <pugixml.hpp> #include <unzip.h> -#include <zlib.h> #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<unsigned int>(byte_increment)); + Common::UpdateCRC32(m_crc32_context, m_data.data(), static_cast<u32>(byte_increment)); }); } |
