From 5e9bb60d68b491630e1124097061f3a5cb645ce1 Mon Sep 17 00:00:00 2001 From: "marwen.azouzi" Date: Mon, 14 Mar 2022 09:40:11 +0100 Subject: [PATCH] Fixes the following compilation error error: implicit conversion from 'size_t' (aka 'unsigned long') to 'CGFloat' (aka 'double') may lose precision [-Werror,-Wimplicit-int-float-conversion] --- src/SFML/Window/OSX/SFWindowController.mm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/SFML/Window/OSX/SFWindowController.mm b/src/SFML/Window/OSX/SFWindowController.mm index 47f0caf42..d6cb30033 100644 --- a/src/SFML/Window/OSX/SFWindowController.mm +++ b/src/SFML/Window/OSX/SFWindowController.mm @@ -630,8 +630,7 @@ NSDictionary* deviceDescription = [[m_window screen] deviceDescription]; NSNumber* screenNumber = [deviceDescription valueForKey:@"NSScreenNumber"]; CGDirectDisplayID screenID = static_cast([screenNumber intValue]); - CGFloat height = CGDisplayPixelsHigh(screenID); - return static_cast(height); + return static_cast(CGDisplayPixelsHigh(screenID)); }