Merge pull request #7029 from lioncash/any
VolumeWii: Shorten padding checking code within CheckIntegrity()
This commit is contained in:
commit
b7a268ceea
|
@ -424,10 +424,9 @@ bool VolumeWii::CheckIntegrity(const Partition& partition) const
|
||||||
// This may cause some false negatives though: some bad clusters may be
|
// This may cause some false negatives though: some bad clusters may be
|
||||||
// skipped because they are *too* bad and are not even recognized as
|
// skipped because they are *too* bad and are not even recognized as
|
||||||
// valid clusters. To be improved.
|
// valid clusters. To be improved.
|
||||||
bool meaningless = false;
|
const u8* pad_begin = cluster_metadata + 0x26C;
|
||||||
for (u32 idx = 0x26C; idx < 0x280; ++idx)
|
const u8* pad_end = pad_begin + 0x14;
|
||||||
if (cluster_metadata[idx] != 0)
|
const bool meaningless = std::any_of(pad_begin, pad_end, [](u8 val) { return val != 0; });
|
||||||
meaningless = true;
|
|
||||||
|
|
||||||
if (meaningless)
|
if (meaningless)
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in New Issue