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)) {