mirror of
https://git.h3cjp.net/H3cJP/yuzu.git
synced 2024-11-11 22:52:56 +00:00
yuzu/main: Resolve precedence bug within CalculateRomFSEntrySize()
Ternary operators have a lower precedence than arithmetic operators, so what was actually occurring here is "return (out + full) ? x : y" which most definitely isn't intended, given we calculate out recursively above. We were essentially doing a lot of work for nothing.
This commit is contained in:
parent
cbb146069a
commit
f646ca874d
|
@ -763,7 +763,7 @@ static std::size_t CalculateRomFSEntrySize(const FileSys::VirtualDir& dir, bool
|
||||||
out += 1 + CalculateRomFSEntrySize(subdir, full);
|
out += 1 + CalculateRomFSEntrySize(subdir, full);
|
||||||
}
|
}
|
||||||
|
|
||||||
return out + full ? dir->GetFiles().size() : 0;
|
return out + (full ? dir->GetFiles().size() : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool RomFSRawCopy(QProgressDialog& dialog, const FileSys::VirtualDir& src,
|
static bool RomFSRawCopy(QProgressDialog& dialog, const FileSys::VirtualDir& src,
|
||||||
|
|
Loading…
Reference in a new issue