From 93c25c9d6ff565748dbda4509ba2732051693136 Mon Sep 17 00:00:00 2001 From: axxel Date: Sun, 22 Sep 2024 23:33:33 +0200 Subject: [PATCH] c++: fix variable shadowing warning in client code This should supersede #837, achieving the same with just one changed line. --- core/src/Quadrilateral.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/Quadrilateral.h b/core/src/Quadrilateral.h index caa1fe375a..7f557daf17 100644 --- a/core/src/Quadrilateral.h +++ b/core/src/Quadrilateral.h @@ -153,7 +153,7 @@ bool HaveIntersectingBoundingBoxes(const Quadrilateral& a, const Quadril template Quadrilateral Blend(const Quadrilateral& a, const Quadrilateral& b) { - auto dist2First = [c = a[0]](auto a, auto b) { return distance(a, c) < distance(b, c); }; + auto dist2First = [r = a[0]](auto s, auto t) { return distance(s, r) < distance(t, r); }; // rotate points such that the the two topLeft points are closest to each other auto offset = std::min_element(b.begin(), b.end(), dist2First) - b.begin();