From 8082c69aff4c83d50e841c25994378bb23cef0f6 Mon Sep 17 00:00:00 2001 From: Patricia Aas Date: Thu, 8 Jul 2021 10:26:59 +0200 Subject: [PATCH] Remove pointer --- scaling-lib/Scaling.mm | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/scaling-lib/Scaling.mm b/scaling-lib/Scaling.mm index d0daf01..9e08f53 100644 --- a/scaling-lib/Scaling.mm +++ b/scaling-lib/Scaling.mm @@ -4,16 +4,12 @@ resolution scale on Apple platforms. It is not a C++ file and is not part of this course! */ #import "AppKit/NSWindow.h" -#include #include "Scaling.hpp" namespace pacman { -double scaling_factor_for_window(sf::WindowHandle) { - NSWindow* window = static_cast(ptr); - assert(window); - double d = [window backingScaleFactor]; - return d; +double scaling_factor_for_window(sf::WindowHandle handle) { + return [ (id) handle backingScaleFactor]; } } \ No newline at end of file