Skip to content

Commit

Permalink
cppcheck: Fix two "condition is always false" warnings.
Browse files Browse the repository at this point in the history
In both of these cases an unsigned value is tested to see if it is
less than zero, which is false by definition. Remove these tests.
  • Loading branch information
linuxdude42 committed Oct 2, 2020
1 parent c985336 commit 8b5c9ea
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
2 changes: 0 additions & 2 deletions mythtv/libs/libmythtv/visualisations/goom/lines.cpp
Expand Up @@ -23,8 +23,6 @@ lighten (unsigned char value, float power)
val = (int) t; // (32.0F * log (t));
if (val > 255)
val = 255;
if (val < 0)
val = 0;
return val;
}
return 0;
Expand Down
2 changes: 0 additions & 2 deletions mythtv/libs/libmythtv/visualisations/goom/tentacle3d.cpp
Expand Up @@ -47,8 +47,6 @@ lighten (unsigned char value, float power)
val = (int) t; // (32.0F * log (t));
if (val > 255)
val = 255;
if (val < 0)
val = 0;
return val;
}
return 0;
Expand Down

0 comments on commit 8b5c9ea

Please sign in to comment.