Fixed warnings about possible loss of data in conversion.
authorPhilipp Wiesemann <philipp.wiesemann@arcor.de>
Sat, 06 Dec 2014 00:17:52 +0100
changeset 9267 6fe4583d7e1f
parent 9266 f6355bfca853
child 9268 7f2833a2191b
Fixed warnings about possible loss of data in conversion.
src/video/SDL_surface.c
--- a/src/video/SDL_surface.c	Thu Dec 04 21:41:30 2014 +0100
+++ b/src/video/SDL_surface.c	Sat Dec 06 00:17:52 2014 +0100
@@ -741,15 +741,15 @@
     dst_y0 += dst->clip_rect.y;
     dst_y1 += dst->clip_rect.y;
 
-    final_src.x = SDL_floor(src_x0 + 0.5);
-    final_src.y = SDL_floor(src_y0 + 0.5);
-    final_src.w = SDL_floor(src_x1 - src_x0 + 1.5);
-    final_src.h = SDL_floor(src_y1 - src_y0 + 1.5);
+    final_src.x = (int)SDL_floor(src_x0 + 0.5);
+    final_src.y = (int)SDL_floor(src_y0 + 0.5);
+    final_src.w = (int)SDL_floor(src_x1 - src_x0 + 1.5);
+    final_src.h = (int)SDL_floor(src_y1 - src_y0 + 1.5);
 
-    final_dst.x = SDL_floor(dst_x0 + 0.5);
-    final_dst.y = SDL_floor(dst_y0 + 0.5);
-    final_dst.w = SDL_floor(dst_x1 - dst_x0 + 1.5);
-    final_dst.h = SDL_floor(dst_y1 - dst_y0 + 1.5);
+    final_dst.x = (int)SDL_floor(dst_x0 + 0.5);
+    final_dst.y = (int)SDL_floor(dst_y0 + 0.5);
+    final_dst.w = (int)SDL_floor(dst_x1 - dst_x0 + 1.5);
+    final_dst.h = (int)SDL_floor(dst_y1 - dst_y0 + 1.5);
 
     if (final_dst.w < 0)
         final_dst.w = 0;