[style] convert to C++11 for loops (#5263)

This commit is contained in:
Simon Lin
2020-07-21 09:41:40 -07:00
committed by GitHub
parent 57ee45be21
commit 5e9b2818eb
31 changed files with 284 additions and 309 deletions
+4 -4
View File
@@ -86,12 +86,12 @@ void TestPool(EntryPool &aPool, bool aInitWithInstance)
VerifyOrQuit(aPool.GetSize() == kPoolSize, "Pool::GetSize() failed");
for (uint16_t i = 0; i < kPoolSize; i++)
for (Entry *&entry : entries)
{
entries[i] = aPool.Allocate();
VerifyOrQuit(entries[i] != nullptr, "Pool::Allocate() failed");
entry = aPool.Allocate();
VerifyOrQuit(entry != nullptr, "Pool::Allocate() failed");
VerifyEntry(aPool, *entries[i], aInitWithInstance);
VerifyEntry(aPool, *entry, aInitWithInstance);
}
for (uint16_t numEntriesToFree = 1; numEntriesToFree <= kPoolSize; numEntriesToFree++)