From cb14aa983db96b9a82a50c47bff36c04452a6423 Mon Sep 17 00:00:00 2001 From: reuk Date: Tue, 7 Feb 2023 17:07:42 +0000 Subject: [PATCH] Path: Allow addPath to take a reference to self --- modules/juce_graphics/geometry/juce_Path.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/juce_graphics/geometry/juce_Path.cpp b/modules/juce_graphics/geometry/juce_Path.cpp index 5026a75d00..dd9162a3b6 100644 --- a/modules/juce_graphics/geometry/juce_Path.cpp +++ b/modules/juce_graphics/geometry/juce_Path.cpp @@ -726,10 +726,11 @@ void Path::addBubble (Rectangle bodyArea, void Path::addPath (const Path& other) { const auto* d = other.data.begin(); + const auto size = other.data.size(); - for (int i = 0; i < other.data.size();) + for (int i = 0; i < size;) { - auto type = d[i++]; + const auto type = d[i++]; if (isMarker (type, moveMarker)) {