Fix cases of variable shadowing in /tests/.
If we manage to fix all the existing cases of variable shadowing, we
could enable -Wshadow.
Change-Id: Ib8b92275c5da71c4ee48540d434f3afdc45f4067
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/438819
Auto-Submit: John Stiles <[email protected]>
Commit-Queue: Florin Malita <[email protected]>
Reviewed-by: Florin Malita <[email protected]>
diff --git a/tests/GrMemoryPoolTest.cpp b/tests/GrMemoryPoolTest.cpp
index 1dd1c73..6424161 100644
--- a/tests/GrMemoryPoolTest.cpp
+++ b/tests/GrMemoryPoolTest.cpp
@@ -214,14 +214,12 @@
}
if (0 == i % kCheckPeriod) {
A::ValidatePool();
- for (int r = 0; r < instanceRecs.count(); ++r) {
- Rec& rec = instanceRecs[r];
+ for (Rec& rec : instanceRecs) {
REPORTER_ASSERT(reporter, rec.fInstance->checkValues(rec.fValue));
}
}
}
- for (int i = 0; i < instanceRecs.count(); ++i) {
- Rec& rec = instanceRecs[i];
+ for (Rec& rec : instanceRecs) {
REPORTER_ASSERT(reporter, rec.fInstance->checkValues(rec.fValue));
delete rec.fInstance;
}