mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
VolumeDirectory: Use a range-based for loop in ComputeNameSize
This commit is contained in:
@ -477,14 +477,11 @@ void CVolumeDirectory::WriteEntry(const File::FSTEntry& entry, u32& fstOffset, u
|
|||||||
static u32 ComputeNameSize(const File::FSTEntry& parentEntry)
|
static u32 ComputeNameSize(const File::FSTEntry& parentEntry)
|
||||||
{
|
{
|
||||||
u32 nameSize = 0;
|
u32 nameSize = 0;
|
||||||
const std::vector<File::FSTEntry>& children = parentEntry.children;
|
for (const File::FSTEntry& entry : parentEntry.children)
|
||||||
for (auto it = children.cbegin(); it != children.cend(); ++it)
|
|
||||||
{
|
{
|
||||||
const File::FSTEntry& entry = *it;
|
|
||||||
if (entry.isDirectory)
|
if (entry.isDirectory)
|
||||||
{
|
|
||||||
nameSize += ComputeNameSize(entry);
|
nameSize += ComputeNameSize(entry);
|
||||||
}
|
|
||||||
nameSize += (u32)entry.virtualName.length() + 1;
|
nameSize += (u32)entry.virtualName.length() + 1;
|
||||||
}
|
}
|
||||||
return nameSize;
|
return nameSize;
|
||||||
|
Reference in New Issue
Block a user