mirror of
https://github.com/wled/WLED.git
synced 2025-07-24 19:26:40 +00:00
Remove unneccessary null checks
This commit is contained in:
parent
79e9dbb9c6
commit
e99e9fed11
@ -1048,8 +1048,8 @@ uint16_t WS2812FX::mode_fireworks() {
|
|||||||
SEGENV.aux0 = UINT16_MAX;
|
SEGENV.aux0 = UINT16_MAX;
|
||||||
SEGENV.aux1 = UINT16_MAX;
|
SEGENV.aux1 = UINT16_MAX;
|
||||||
}
|
}
|
||||||
bool valid1 = (SEGENV.aux0 < SEGLEN && SEGENV.aux0 >= 0);
|
bool valid1 = (SEGENV.aux0 < SEGLEN);
|
||||||
bool valid2 = (SEGENV.aux1 < SEGLEN && SEGENV.aux1 >= 0);
|
bool valid2 = (SEGENV.aux1 < SEGLEN);
|
||||||
uint32_t sv1 = 0, sv2 = 0;
|
uint32_t sv1 = 0, sv2 = 0;
|
||||||
if (valid1) sv1 = getPixelColor(SEGENV.aux0);
|
if (valid1) sv1 = getPixelColor(SEGENV.aux0);
|
||||||
if (valid2) sv2 = getPixelColor(SEGENV.aux1);
|
if (valid2) sv2 = getPixelColor(SEGENV.aux1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user