Descend the array in the right way
ClosedPublic

Authored by jtamate on Oct 2 2018, 6:57 PM.

Details

Summary

Detected by cppcheck as Opposite inner 'if' condition leads to a dead code block (outer condition is 'j>0' and inner condition is 'j==0').
The array is 0 based, therefore [0-4].

Test Plan

make test passes

Diff Detail

Repository
R37 Krita
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
jtamate created this revision.Oct 2 2018, 6:57 PM
Restricted Application added a project: Krita. · View Herald TranscriptOct 2 2018, 6:57 PM
jtamate requested review of this revision.Oct 2 2018, 6:57 PM
dkazakov requested changes to this revision.Oct 3 2018, 8:07 AM
dkazakov added a subscriber: dkazakov.
dkazakov added inline comments.
libs/pigment/KoColorSpace.cpp
210

This line looks incorrect after this change...

This revision now requires changes to proceed.Oct 3 2018, 8:07 AM
jtamate updated this revision to Diff 42791.Oct 3 2018, 1:30 PM
jtamate marked an inline comment as done.

Changed 2 more 5 by 4.

dkazakov accepted this revision.Oct 4 2018, 2:46 PM

Thank you for the patch! Please push! :)

This revision is now accepted and ready to land.Oct 4 2018, 2:46 PM
This revision was automatically updated to reflect the committed changes.