Fix range-based for loops which copy the loop variable unnecessarily.
This will allow us to enable the ClangTidy check
performance-for-range-copy.
Change-Id: I11f152ffe458f5f353da8715ffd2fd47cf4e71a7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306946
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
diff --git a/src/pathops/SkPathOpsAsWinding.cpp b/src/pathops/SkPathOpsAsWinding.cpp
index 763427f..500dc35 100644
--- a/src/pathops/SkPathOpsAsWinding.cpp
+++ b/src/pathops/SkPathOpsAsWinding.cpp
@@ -325,7 +325,7 @@
SkPathPriv::Iterate iterate(fPath);
auto iter = iterate.begin();
int verbCount = 0;
- for (auto contour : contours) {
+ for (const Contour& contour : contours) {
SkPath reverse;
SkPath* temp = contour.fReverse ? &reverse : result;
for (; iter != iterate.end() && verbCount < contour.fVerbEnd; ++iter, ++verbCount) {