summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorLarsson@.(none) <Larsson@.(none)>2010-02-26 08:52:38 +0100
committerunknown <Alexander Larsson@.(none)>2010-03-01 15:12:30 +0100
commitbb77edf6435af599830e9500c13b8ef9d196e9c0 (patch)
tree68ea50e5735bc67cc32d822558290837695d2061 /common
parent872be6b2d787ce0772beb7a5f741e14ed373ef86 (diff)
downloadspice-bb77edf6435af599830e9500c13b8ef9d196e9c0.tar.gz
spice-bb77edf6435af599830e9500c13b8ef9d196e9c0.tar.xz
spice-bb77edf6435af599830e9500c13b8ef9d196e9c0.zip
Have only one copy of ROUND macro and cast to int explicitly
Diffstat (limited to 'common')
-rw-r--r--common/cairo_canvas.c2
-rw-r--r--common/canvas_base.c2
2 files changed, 1 insertions, 3 deletions
diff --git a/common/cairo_canvas.c b/common/cairo_canvas.c
index 15e4e242..addb3d47 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 09fdca01..23039eb3 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 {