From 279092ccc09439ca01b83b44c6d364240cf6bf25 Mon Sep 17 00:00:00 2001 From: Riley Testut Date: Wed, 13 Jul 2016 02:37:16 -0500 Subject: [PATCH] Fixes unused result warnings --- Delta/AppDelegate.swift | 2 +- Delta/Emulation/EmulationViewController.swift | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Delta/AppDelegate.swift b/Delta/AppDelegate.swift index affc1a8..590a266 100644 --- a/Delta/AppDelegate.swift +++ b/Delta/AppDelegate.swift @@ -27,7 +27,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate semaphore.signal() } - semaphore.wait(timeout: DispatchTime.distantFuture) + semaphore.wait() // Controllers ExternalControllerManager.shared.startMonitoringExternalControllers() diff --git a/Delta/Emulation/EmulationViewController.swift b/Delta/Emulation/EmulationViewController.swift index 9d5cbad..8fc1ca3 100644 --- a/Delta/Emulation/EmulationViewController.swift +++ b/Delta/Emulation/EmulationViewController.swift @@ -306,12 +306,12 @@ private extension EmulationViewController self.performSegue(withIdentifier: "pauseSegue", sender: sender) } - func pauseEmulation() -> Bool + @discardableResult func pauseEmulation() -> Bool { return self.emulatorCore.pause() } - func resumeEmulation() -> Bool + @discardableResult func resumeEmulation() -> Bool { guard !self.choosingSustainedButtons && self.pauseViewController == nil else { return false } @@ -443,8 +443,8 @@ private extension EmulationViewController // To ensure the emulator core recognizes us activating the input again, we need to wait at least two frames // Unfortunately we cannot init DispatchSemaphore with value less than 0 // To compensate, we simply wait twice; once the first wait returns, we wait again - semaphore.semaphore.wait(timeout: DispatchTime.distantFuture) - semaphore.semaphore.wait(timeout: DispatchTime.distantFuture) + semaphore.semaphore.wait() + semaphore.semaphore.wait() // These MUST be performed serially, or else Bad Things Happen™ if multiple inputs are reactivated at once self.reactivateSustainInputsQueue.addOperation {