From 79250d958403b16e475d92139ecd90192e538af2 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 bb5a7e1d..d4e5adeb 100644 --- a/src/SFML/Window/OSX/SFWindowController.mm +++ b/src/SFML/Window/OSX/SFWindowController.mm @@ -631,8 +631,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)); }