mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 06:39:46 -06:00
clang-modernize -loop-convert
and some manual adjustments
This commit is contained in:
@ -34,8 +34,10 @@ void SectorReader::SetSectorSize(int blocksize)
|
||||
}
|
||||
|
||||
SectorReader::~SectorReader() {
|
||||
for (int i = 0; i < CACHE_SIZE; i++)
|
||||
delete [] cache[i];
|
||||
for (u8*& block : cache)
|
||||
{
|
||||
delete [] block;
|
||||
}
|
||||
}
|
||||
|
||||
const u8 *SectorReader::GetBlockData(u64 block_num)
|
||||
|
@ -325,11 +325,9 @@ CNANDContentManager CNANDContentManager::m_Instance;
|
||||
|
||||
CNANDContentManager::~CNANDContentManager()
|
||||
{
|
||||
CNANDContentMap::iterator itr = m_Map.begin();
|
||||
while (itr != m_Map.end())
|
||||
for (auto& entry : m_Map)
|
||||
{
|
||||
delete itr->second;
|
||||
++itr;
|
||||
delete entry.second;
|
||||
}
|
||||
m_Map.clear();
|
||||
}
|
||||
|
@ -170,14 +170,14 @@ static IVolume* CreateVolumeFromCryptedWiiImage(IBlobReader& _rReader, u32 _Part
|
||||
SPartitionGroup PartitionGroup[4];
|
||||
|
||||
// read all partitions
|
||||
for (u32 x = 0; x < 4; x++)
|
||||
for (SPartitionGroup& group : PartitionGroup)
|
||||
{
|
||||
for (u32 i = 0; i < numPartitions; i++)
|
||||
{
|
||||
SPartition Partition;
|
||||
Partition.Offset = ((u64)Reader.Read32(PartitionsOffset + (i * 8) + 0)) << 2;
|
||||
Partition.Type = Reader.Read32(PartitionsOffset + (i * 8) + 4);
|
||||
PartitionGroup[x].PartitionsVec.push_back(Partition);
|
||||
group.PartitionsVec.push_back(Partition);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user