Fix cases of variable shadowing in samplecode/.
These were reviewed last year at http://review.skia.org/312480 but never
landed. Splitting into small chunks to land individually.
If we manage to fix all the existing cases of variable shadowing, we
could enable -Wshadow.
Change-Id: I53d04e5b2ffd7e170a8b10a6bacbc239c8b5e7ff
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/435720
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ravi Mistry <rmistry@google.com>
diff --git a/samplecode/SampleThinAA.cpp b/samplecode/SampleThinAA.cpp
index 534f0ab..452548d 100644
--- a/samplecode/SampleThinAA.cpp
+++ b/samplecode/SampleThinAA.cpp
@@ -484,8 +484,7 @@
SkFont font(nullptr, 12);
if (gridX == 0) {
- SkString name = shape->name();
- SkScalar centering = name.size() * 4.f; // ad-hoc
+ SkScalar centering = shape->name().size() * 4.f; // ad-hoc
canvas->save();
canvas->translate(-10.f, 4 * ShapeRenderer::kTileHeight + centering);