Skip to content

Commit

Permalink
removed unnecessary lambda function
Browse files Browse the repository at this point in the history
performance is the same, the function just makes it a bit confusing.
  • Loading branch information
DedeHai committed Feb 6, 2025
1 parent 64a02b7 commit 373f4cf
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions wled00/FX_2Dfcn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down

0 comments on commit 373f4cf

Please # to comment.