Diffusion Krita 6df18b5fea8e

Change order in conditions in while() in KoZoomAction

Authored by tymond on May 6 2020, 12:44 AM.

Description

Change order in conditions in while() in KoZoomAction

Before this commit, while loop would first check the value of the
array in a specific index and only later if the index is in range.
That shouldn't lead to any problems per se unless the array is very
short, because it always starts from the other end of the array and
the loop ends before the index can fall out of range.
However it seems like it triggered some statis analysis tool and it
might potentially deceive a future programmer if some of the external
conditions (like the starting index) changes.
This commit reverses the order of the conditions so the index is checked
first.

BUG:421079
(cherry picked from commit 10d47bd625663ed576ccc527f3219e8aa133995f)

Details

Committed
remptMay 6 2020, 9:47 AM
Parents
R37:f7e8b16c83cc: Add small test for KoZoomAction
Branches
Unknown
Tags
Unknown