[aseprite] 101/128: Fix warnings between double <-> int conversion

Tobias Hansen thansen at moszumanska.debian.org
Mon May 9 21:24:28 UTC 2016


This is an automated email from the git hooks/post-receive script.

thansen pushed a commit to branch master
in repository aseprite.

commit 5b51e281d3c555624d705c9976663d17ea771c97
Author: David Capello <davidcapello at gmail.com>
Date:   Wed May 4 09:36:05 2016 -0300

    Fix warnings between double <-> int conversion
---
 src/app/ui/editor/pixels_movement.cpp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/app/ui/editor/pixels_movement.cpp b/src/app/ui/editor/pixels_movement.cpp
index f6d4989..018be3b 100644
--- a/src/app/ui/editor/pixels_movement.cpp
+++ b/src/app/ui/editor/pixels_movement.cpp
@@ -328,10 +328,10 @@ void PixelsMovement::moveImage(const gfx::Point& pos, MoveModifier moveModifier)
           h = 1.0;
         }
 
-        a.x = (a.x-pivot.x)*(1.0+dx/w) + pivot.x;
-        a.y = (a.y-pivot.y)*(1.0+dy/h) + pivot.y;
-        b.x = (b.x-pivot.x)*(1.0+dx/w) + pivot.x;
-        b.y = (b.y-pivot.y)*(1.0+dy/h) + pivot.y;
+        a.x = int((a.x-pivot.x)*(1.0+dx/w) + pivot.x);
+        a.y = int((a.y-pivot.y)*(1.0+dy/h) + pivot.y);
+        b.x = int((b.x-pivot.x)*(1.0+dx/w) + pivot.x);
+        b.y = int((b.y-pivot.y)*(1.0+dy/h) + pivot.y);
       }
 
       // Do not use "gfx::Rect(a, b)" here because if a > b we want to

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/aseprite.git



More information about the Pkg-games-commits mailing list