mirror of
https://github.com/wled/WLED.git
synced 2025-07-11 12:56:32 +00:00
removed unnecessary lambda function
performance is the same, the function just makes it a bit confusing.
This commit is contained in:
parent
64a02b705a
commit
373f4cfefd
@ -166,16 +166,11 @@ void IRAM_ATTR_YN Segment::_setPixelColorXY_raw(const int& x, const int& y, uint
|
|||||||
|
|
||||||
// Apply mirroring
|
// Apply mirroring
|
||||||
if (mirror || mirror_y) {
|
if (mirror || mirror_y) {
|
||||||
auto setMirroredPixel = [&](int mx, int my) {
|
|
||||||
strip.setPixelColorXY(mx, my, col);
|
|
||||||
};
|
|
||||||
|
|
||||||
const int mirrorX = start + width() - x - 1;
|
const int mirrorX = start + width() - x - 1;
|
||||||
const int mirrorY = startY + height() - y - 1;
|
const int mirrorY = startY + height() - y - 1;
|
||||||
|
if (mirror) strip.setPixelColorXY(transpose ? baseX : mirrorX, transpose ? mirrorY : baseY, col);
|
||||||
if (mirror) setMirroredPixel(transpose ? baseX : mirrorX, transpose ? mirrorY : baseY);
|
if (mirror_y) strip.setPixelColorXY(transpose ? mirrorX : baseX, transpose ? baseY : mirrorY, col);
|
||||||
if (mirror_y) setMirroredPixel(transpose ? mirrorX : baseX, transpose ? baseY : mirrorY);
|
if (mirror && mirror_y) strip.setPixelColorXY(mirrorX, mirrorY, col);
|
||||||
if (mirror && mirror_y) setMirroredPixel(mirrorX, mirrorY);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user