mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-28 01:49:33 -06:00
Replace remaining uses of zlib crc32 with Common/Hash.h
This commit is contained in:
@ -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));
|
||||
});
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user