From 436a4a92767bf53f20efab512db3a9419fffd909 Mon Sep 17 00:00:00 2001 From: Woody Date: Fri, 27 Oct 2023 10:34:39 +0200 Subject: [PATCH] Use a reference instead of segment object copy --- wled00/overlay.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wled00/overlay.cpp b/wled00/overlay.cpp index d76399e6..93b30e69 100644 --- a/wled00/overlay.cpp +++ b/wled00/overlay.cpp @@ -90,9 +90,9 @@ void _overlayAnalogCountdown() void handleOverlayDraw() { usermods.handleOverlayDraw(); if (analogClockSolidBlack) { - Segment* segments = strip.getSegments(); + const Segment* segments = strip.getSegments(); for (uint8_t i = 0; i < strip.getActiveSegmentsNum(); i++) { - Segment segment = segments[i]; + const Segment& segment = segments[i]; if (segment.mode > 0 || segment.colors[0] > 0) { return; }