Persistently fixing some PVS-Studio static analyzer false positive warnings.

This commit is contained in:
omar
2019-01-27 16:35:48 +01:00
parent ee3b4f2bf1
commit 4e8e177cac
4 changed files with 7 additions and 7 deletions

View File

@ -882,7 +882,7 @@ static void ShowDemoWindowWidgets()
// Note: We _unnecessarily_ test for both x/y and i here only to silence some static analyzer. The second part of each test is unnecessary.
int x = i % 4;
int y = i / 4;
if (x > 0 && i > 0) { selected[i - 1] ^= 1; }
if (x > 0) { selected[i - 1] ^= 1; }
if (x < 3 && i < 15) { selected[i + 1] ^= 1; }
if (y > 0 && i > 3) { selected[i - 4] ^= 1; }
if (y < 3 && i < 12) { selected[i + 4] ^= 1; }