summaryrefslogtreecommitdiff
path: root/src/SFML/Window/iOS/SFView.mm
diff options
context:
space:
mode:
Diffstat (limited to 'src/SFML/Window/iOS/SFView.mm')
-rw-r--r--src/SFML/Window/iOS/SFView.mm18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/SFML/Window/iOS/SFView.mm b/src/SFML/Window/iOS/SFView.mm
index 940d0a8..e639065 100644
--- a/src/SFML/Window/iOS/SFView.mm
+++ b/src/SFML/Window/iOS/SFView.mm
@@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////
//
// SFML - Simple and Fast Multimedia Library
-// Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org)
+// Copyright (C) 2007-2023 Laurent Gomila (laurent@sfml-dev.org)
//
// This software is provided 'as-is', without any express or implied warranty.
// In no event will the authors be held liable for any damages arising from the use of this software.
@@ -31,6 +31,14 @@
#include <QuartzCore/CAEAGLLayer.h>
#include <cstring>
+#if defined(__APPLE__)
+ #if defined(__clang__)
+ #pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ #elif defined(__GNUC__)
+ #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+ #endif
+#endif
+
@interface SFView()
@property (nonatomic) NSMutableArray* touches;
@@ -103,7 +111,7 @@
sf::Vector2i position(static_cast<int>(point.x), static_cast<int>(point.y));
// notify the application delegate
- [[SFAppDelegate getInstance] notifyTouchBegin:index atPosition:position];
+ [[SFAppDelegate getInstance] notifyTouchBegin:(static_cast<unsigned int>(index)) atPosition:position];
}
}
@@ -122,7 +130,7 @@
sf::Vector2i position(static_cast<int>(point.x), static_cast<int>(point.y));
// notify the application delegate
- [[SFAppDelegate getInstance] notifyTouchMove:index atPosition:position];
+ [[SFAppDelegate getInstance] notifyTouchMove:(static_cast<unsigned int>(index)) atPosition:position];
}
}
}
@@ -142,7 +150,7 @@
sf::Vector2i position(static_cast<int>(point.x), static_cast<int>(point.y));
// notify the application delegate
- [[SFAppDelegate getInstance] notifyTouchEnd:index atPosition:position];
+ [[SFAppDelegate getInstance] notifyTouchEnd:(static_cast<unsigned int>(index)) atPosition:position];
// remove the touch
[self.touches replaceObjectAtIndex:index withObject:[NSNull null]];
@@ -187,7 +195,7 @@
self.touches = [NSMutableArray array];
// Configure the EAGL layer
- CAEAGLLayer* eaglLayer = (CAEAGLLayer*)self.layer;
+ CAEAGLLayer* eaglLayer = static_cast<CAEAGLLayer*>(self.layer);
eaglLayer.opaque = YES;
eaglLayer.drawableProperties = [NSDictionary dictionaryWithObjectsAndKeys:
[NSNumber numberWithBool:FALSE], kEAGLDrawablePropertyRetainedBacking,