From 373f4cfefdee720173043072e35af5e3208c4005 Mon Sep 17 00:00:00 2001 From: Damian Schneider Date: Thu, 6 Feb 2025 06:41:02 +0100 Subject: [PATCH] removed unnecessary lambda function performance is the same, the function just makes it a bit confusing. --- wled00/FX_2Dfcn.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/wled00/FX_2Dfcn.cpp b/wled00/FX_2Dfcn.cpp index 67624bac3..b8f845bb3 100644 --- a/wled00/FX_2Dfcn.cpp +++ b/wled00/FX_2Dfcn.cpp @@ -166,16 +166,11 @@ void IRAM_ATTR_YN Segment::_setPixelColorXY_raw(const int& x, const int& y, uint // Apply mirroring if (mirror || mirror_y) { - auto setMirroredPixel = [&](int mx, int my) { - strip.setPixelColorXY(mx, my, col); - }; - const int mirrorX = start + width() - x - 1; const int mirrorY = startY + height() - y - 1; - - if (mirror) setMirroredPixel(transpose ? baseX : mirrorX, transpose ? mirrorY : baseY); - if (mirror_y) setMirroredPixel(transpose ? mirrorX : baseX, transpose ? baseY : mirrorY); - if (mirror && mirror_y) setMirroredPixel(mirrorX, mirrorY); + if (mirror) strip.setPixelColorXY(transpose ? baseX : mirrorX, transpose ? mirrorY : baseY, col); + if (mirror_y) strip.setPixelColorXY(transpose ? mirrorX : baseX, transpose ? baseY : mirrorY, col); + if (mirror && mirror_y) strip.setPixelColorXY(mirrorX, mirrorY, col); } }