-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/108708/
-----------------------------------------------------------

Review request for Calligra and Boudewijn Rempt.


Description
-------

MSVC hints in its warnings that using operator-() on an unsigned int will still 
result in an unsigned int.
Reading up the intertubes on that it seems to be usually the 2's complement of 
the value.
So all the rect calculations in these blur filter must have been giving strange 
results for quite some time.

Is that true? Nobody saw that?

Attached patch fixes that by always turning the values used for calculations 
into signed integer, by the implicit conversion coming with the assignment.

Other possible fixes would be to simply switch the operator-() usage into a -1* 
operation. Not sure what I prefer, your choice :)


Diffs
-----

  krita/plugins/filters/blur/kis_blur_filter.cpp b81f0bd 
  krita/plugins/filters/blur/kis_gaussian_blur_filter.cpp 0c68562 
  krita/plugins/filters/blur/kis_motion_blur_filter.cpp 6a13ca3 

Diff: http://git.reviewboard.kde.org/r/108708/diff/


Testing
-------

None, as I have no clue of the blur filters and how to see the effect of the 
patch. Left for Krita insiders.


Thanks,

Friedrich W. H. Kossebau

_______________________________________________
calligra-devel mailing list
calligra-devel@kde.org
https://mail.kde.org/mailman/listinfo/calligra-devel

Reply via email to