Merge pull request #9854 from JosJuice/wia-ice

DiscIO: Store partition key directly in ReuseID
This commit is contained in:
Léo Lam 2021-07-06 13:05:09 +02:00 committed by GitHub
commit 39e14b6b5f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -1304,7 +1304,7 @@ WIARVZFileReader<RVZ>::ProcessAndCompress(CompressThreadState* state, CompressPa
std::vector<u8>& data = parameters.data; std::vector<u8>& data = parameters.data;
if (AllSame(data)) if (AllSame(data))
entry.reuse_id = ReuseID{nullptr, data.size(), false, data.front()}; entry.reuse_id = ReuseID{WiiKey{}, data.size(), false, data.front()};
if constexpr (RVZ) if constexpr (RVZ)
{ {
@ -1343,7 +1343,7 @@ WIARVZFileReader<RVZ>::ProcessAndCompress(CompressThreadState* state, CompressPa
const auto create_reuse_id = [&partition_entry, blocks, const auto create_reuse_id = [&partition_entry, blocks,
blocks_per_chunk](u8 value, bool encrypted, u64 block) { blocks_per_chunk](u8 value, bool encrypted, u64 block) {
const u64 size = std::min(blocks - block, blocks_per_chunk) * VolumeWii::BLOCK_DATA_SIZE; const u64 size = std::min(blocks - block, blocks_per_chunk) * VolumeWii::BLOCK_DATA_SIZE;
return ReuseID{&partition_entry.partition_key, size, encrypted, value}; return ReuseID{partition_entry.partition_key, size, encrypted, value};
}; };
const u8* parameters_data_end = parameters.data.data() + parameters.data.size(); const u8* parameters_data_end = parameters.data.data() + parameters.data.size();

View File

@ -257,7 +257,7 @@ private:
#undef COMPARE_TIED #undef COMPARE_TIED
const WiiKey* partition_key; WiiKey partition_key;
u64 data_size; u64 data_size;
bool encrypted; bool encrypted;
u8 value; u8 value;