diff --git a/libsrc/hyperion/Hyperion.cpp b/libsrc/hyperion/Hyperion.cpp index 45a2d322..67687864 100644 --- a/libsrc/hyperion/Hyperion.cpp +++ b/libsrc/hyperion/Hyperion.cpp @@ -860,9 +860,9 @@ void Hyperion::update() // Apply the correction and the transform to each led and color-channel // Avoid applying correction, the same task is performed by adjustment // std::vector correctedColors = _raw2ledCorrection->applyCorrection(priorityInfo.ledColors); - std::vector adjustedColors = _raw2ledAdjustment->applyAdjustment(priorityInfo.ledColors); - std::vector transformColors =_raw2ledTransform->applyTransform(adjustedColors); - std::vector ledColors = _raw2ledTemperature->applyCorrection(transformColors); + std::vector transformColors =_raw2ledTransform->applyTransform(priorityInfo.ledColors); + std::vector adjustedColors = _raw2ledAdjustment->applyAdjustment(transformColors); + std::vector ledColors = _raw2ledTemperature->applyCorrection(adjustedColors); const std::vector& leds = _ledString.leds(); int i = 0; for (ColorRgb& color : ledColors) @@ -885,18 +885,14 @@ void Hyperion::update() break; case ORDER_GBR: { - uint8_t temp = color.red; - color.red = color.green; - color.green = color.blue; - color.blue = temp; + std::swap(color.red, color.green); + std::swap(color.green, color.blue); break; } case ORDER_BRG: { - uint8_t temp = color.red; - color.red = color.blue; - color.blue = color.green; - color.green = temp; + std::swap(color.red, color.blue); + std::swap(color.green, color.blue); break; } }