Fix cases of variable shadowing in /samplecode/.
If we manage to fix all the existing cases of variable shadowing, we
could enable -Wshadow.
Change-Id: I4c476668a83a0054fe8624d5ffa650db202ba810
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/438376
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
diff --git a/samplecode/SampleVariableWidthStroker.cpp b/samplecode/SampleVariableWidthStroker.cpp
index ab2117a..7d9a352 100644
--- a/samplecode/SampleVariableWidthStroker.cpp
+++ b/samplecode/SampleVariableWidthStroker.cpp
@@ -463,7 +463,7 @@
* TODO: no reason this needs to return a vector of quads, can just append to the path
*/
std::vector<PathSegment> strokeSegment(const PathSegment& seg,
- const ScalarBezCurve& distFnc) const;
+ const ScalarBezCurve& distanceFunc) const;
/** Adds an endcap to fOuter */
enum class CapLocation { Start, End };
@@ -636,7 +636,7 @@
}
std::vector<SkVarWidthStroker::PathSegment> SkVarWidthStroker::strokeSegment(
- const PathSegment& seg, const ScalarBezCurve& distFnc) const {
+ const PathSegment& seg, const ScalarBezCurve& distanceFunc) const {
// Work item for the recursive splitting stack.
struct Item {
PathSegment fSeg;
@@ -659,7 +659,7 @@
// Push the initial segment and distance function
std::stack<Item> stack;
- stack.push(Item(seg, distFnc, ScalarBezCurve::Mul(distFnc, distFnc)));
+ stack.push(Item(seg, distanceFunc, ScalarBezCurve::Mul(distanceFunc, distanceFunc)));
std::vector<PathSegment> result;
constexpr int kMaxIters = 5000; /** TODO: this is completely arbitrary */