More work on C++11 for loops.
This commit is contained in:
parent
16a2d063e3
commit
ca2e46a6e0
|
@ -446,9 +446,9 @@ bool LibPartedBackend::closeDevice(CoreBackendDevice* core_device)
|
|||
|
||||
PedPartitionFlag LibPartedBackend::getPedFlag(PartitionTable::Flag flag)
|
||||
{
|
||||
for (quint32 i = 0; i < sizeof(flagmap) / sizeof(flagmap[0]); i++)
|
||||
if (flagmap[i].flag == flag)
|
||||
return flagmap[i].pedFlag;
|
||||
for (const auto &f : flagmap)
|
||||
if (f.flag == flag)
|
||||
return f.pedFlag;
|
||||
|
||||
return static_cast<PedPartitionFlag>(-1);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue