[PATCH 1/5] Have only one copy of ROUND macro and cast to int explicitly

unknown (none) AlexanderLarsson at .
Thu Feb 25 23:52:38 PST 2010


---
 common/cairo_canvas.c |    2 --
 common/canvas_base.c  |    2 +-
 2 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/common/cairo_canvas.c b/common/cairo_canvas.c
index 15e4e24..addb3d4 100644
--- a/common/cairo_canvas.c
+++ b/common/cairo_canvas.c
@@ -26,8 +26,6 @@
 #include "lines.h"
 #include "pixman_utils.h"
 
-#define ROUND(_x) floor((_x) + 0.5)
-
 struct CairoCanvas {
     CanvasBase base;
     uint32_t *private_data;
diff --git a/common/canvas_base.c b/common/canvas_base.c
index 09fdca0..23039eb 100644
--- a/common/canvas_base.c
+++ b/common/canvas_base.c
@@ -76,7 +76,7 @@
 #define MAX(x, y) (((x) >= (y)) ? (x) : (y))
 #endif
 
-#define ROUND(_x) floor((_x) + 0.5)
+#define ROUND(_x) ((int)floor((_x) + 0.5))
 
 #ifdef WIN32
 typedef struct  __declspec (align(1)) LZImage {
-- 
1.6.4.msysgit.0


--=-C/urJLXRf5ZTBGTwlhnK
Content-Disposition: attachment; filename="0002-Fix-warnings-from-visual-studio-compiler.patch"
Content-Type: text/x-patch; name="0002-Fix-warnings-from-visual-studio-compiler.patch"; charset="UTF-8"
Content-Transfer-Encoding: 7bit



More information about the Spice-devel mailing list