Skip to content
Permalink
Browse files

Remove unneccessary null checks

  • Loading branch information
Aircoookie committed Jan 14, 2020
1 parent 79e9dbb commit e99e9fed110d291149bc2112d7e4d6c41d120df5
Showing with 2 additions and 2 deletions.
  1. +2 −2 wled00/FX.cpp
@@ -1048,8 +1048,8 @@ uint16_t WS2812FX::mode_fireworks() {
SEGENV.aux0 = UINT16_MAX;
SEGENV.aux1 = UINT16_MAX;
}
bool valid1 = (SEGENV.aux0 < SEGLEN && SEGENV.aux0 >= 0);
bool valid2 = (SEGENV.aux1 < SEGLEN && SEGENV.aux1 >= 0);
bool valid1 = (SEGENV.aux0 < SEGLEN);
bool valid2 = (SEGENV.aux1 < SEGLEN);
uint32_t sv1 = 0, sv2 = 0;
if (valid1) sv1 = getPixelColor(SEGENV.aux0);
if (valid2) sv2 = getPixelColor(SEGENV.aux1);

0 comments on commit e99e9fe

Please sign in to comment.
You can’t perform that action at this time.