summaryrefslogtreecommitdiffstats
path: root/platform/ios
diff options
context:
space:
mode:
authorNinni Pipping <over999ships@gmail.com>2023-05-11 12:32:23 +0200
committerNinni Pipping <over999ships@gmail.com>2023-05-11 16:00:59 +0200
commit71ee65dc5701a0675ae6b1879a694a28c7206a63 (patch)
tree28eb06dc8c5422c9e0d0c7ca2a024f0c179da6b2 /platform/ios
parentfd4a06c51555904104b18494d0224f450d74fe2a (diff)
downloadredot-engine-71ee65dc5701a0675ae6b1879a694a28c7206a63.tar.gz
Enable shadow warnings and fix raised errors
Diffstat (limited to 'platform/ios')
-rw-r--r--platform/ios/ios.mm18
1 files changed, 9 insertions, 9 deletions
diff --git a/platform/ios/ios.mm b/platform/ios/ios.mm
index 1065f5fd2a..c911a512a5 100644
--- a/platform/ios/ios.mm
+++ b/platform/ios/ios.mm
@@ -72,8 +72,8 @@ CHHapticEngine *iOS::get_haptic_engine_instance() API_AVAILABLE(ios(13)) {
void iOS::vibrate_haptic_engine(float p_duration_seconds) API_AVAILABLE(ios(13)) {
if (@available(iOS 13, *)) { // We need the @available check every time to make the compiler happy...
if (supports_haptic_engine()) {
- CHHapticEngine *haptic_engine = get_haptic_engine_instance();
- if (haptic_engine) {
+ CHHapticEngine *cur_haptic_engine = get_haptic_engine_instance();
+ if (cur_haptic_engine) {
NSDictionary *hapticDict = @{
CHHapticPatternKeyPattern : @[
@{CHHapticPatternKeyEvent : @{
@@ -88,7 +88,7 @@ void iOS::vibrate_haptic_engine(float p_duration_seconds) API_AVAILABLE(ios(13))
NSError *error;
CHHapticPattern *pattern = [[CHHapticPattern alloc] initWithDictionary:hapticDict error:&error];
- [[haptic_engine createPlayerWithPattern:pattern error:&error] startAtTime:0 error:&error];
+ [[cur_haptic_engine createPlayerWithPattern:pattern error:&error] startAtTime:0 error:&error];
NSLog(@"Could not vibrate using haptic engine: %@", error);
}
@@ -103,9 +103,9 @@ void iOS::vibrate_haptic_engine(float p_duration_seconds) API_AVAILABLE(ios(13))
void iOS::start_haptic_engine() {
if (@available(iOS 13, *)) {
if (supports_haptic_engine()) {
- CHHapticEngine *haptic_engine = get_haptic_engine_instance();
- if (haptic_engine) {
- [haptic_engine startWithCompletionHandler:^(NSError *returnedError) {
+ CHHapticEngine *cur_haptic_engine = get_haptic_engine_instance();
+ if (cur_haptic_engine) {
+ [cur_haptic_engine startWithCompletionHandler:^(NSError *returnedError) {
if (returnedError) {
NSLog(@"Could not start haptic engine: %@", returnedError);
}
@@ -122,9 +122,9 @@ void iOS::start_haptic_engine() {
void iOS::stop_haptic_engine() {
if (@available(iOS 13, *)) {
if (supports_haptic_engine()) {
- CHHapticEngine *haptic_engine = get_haptic_engine_instance();
- if (haptic_engine) {
- [haptic_engine stopWithCompletionHandler:^(NSError *returnedError) {
+ CHHapticEngine *cur_haptic_engine = get_haptic_engine_instance();
+ if (cur_haptic_engine) {
+ [cur_haptic_engine stopWithCompletionHandler:^(NSError *returnedError) {
if (returnedError) {
NSLog(@"Could not stop haptic engine: %@", returnedError);
}