From 5e8097475ba237bc0bc71ad78a7cbdf2d71f7b87 Mon Sep 17 00:00:00 2001 From: rbuj Date: Sun, 12 Dec 2021 11:39:14 +0100 Subject: Fix some -Wfloat-conversion warnings --- src/core/place.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/core/place.c') diff --git a/src/core/place.c b/src/core/place.c index b3fa6569..1aafff79 100644 --- a/src/core/place.c +++ b/src/core/place.c @@ -46,8 +46,8 @@ northwestcmp (gconstpointer a, gconstpointer b) { MetaWindow *aw = (gpointer) a; MetaWindow *bw = (gpointer) b; - int from_origin_a; - int from_origin_b; + double from_origin_a; + double from_origin_b; int ax, ay, bx, by; /* we're interested in the frame position for cascading, @@ -76,8 +76,8 @@ northwestcmp (gconstpointer a, gconstpointer b) } /* probably there's a fast good-enough-guess we could use here. */ - from_origin_a = sqrt (ax * ax + ay * ay); - from_origin_b = sqrt (bx * bx + by * by); + from_origin_a = sqrt ((double) (ax * ax + ay * ay)); + from_origin_b = sqrt ((double) (bx * bx + by * by)); if (from_origin_a < from_origin_b) return -1; -- cgit v1.2.1