Fixes warnings

This commit is contained in:
Riley Testut 2018-11-12 11:52:11 -08:00
parent 4939a7da25
commit 52c15eeb60
6 changed files with 9 additions and 9 deletions

View File

@ -149,7 +149,7 @@ extension GamesViewController
{
guard let identifier = segue.identifier, identifier == "embedPageViewController" else { return }
self.pageViewController = segue.destination as! UIPageViewController
self.pageViewController = segue.destination as? UIPageViewController
self.pageViewController.dataSource = self
self.pageViewController.delegate = self
self.pageViewController.view.isHidden = true

View File

@ -79,7 +79,7 @@ class LaunchViewController: UIViewController
{
guard segue.identifier == "embedGameViewController" else { return }
self.gameViewController = segue.destination as! GameViewController
self.gameViewController = segue.destination as? GameViewController
}
}

View File

@ -159,9 +159,9 @@ extension CheatTextView: NSLayoutManagerDelegate
layoutManager.setGlyphs(glyphBuffer, properties: propertyBuffer, characterIndexes: characterBuffer, font: aFont, forGlyphRange: NSRange(location: glyphRange.location, length: glyphCount + offset))
// Clean up memory
characterBuffer.deallocate(capacity: bufferSize)
propertyBuffer.deallocate(capacity: bufferSize)
glyphBuffer.deallocate(capacity: bufferSize)
characterBuffer.deallocate()
propertyBuffer.deallocate()
glyphBuffer.deallocate()
// Return total number of glyphs
return glyphCount + offset

View File

@ -80,7 +80,7 @@ extension PauseViewController
switch identifier
{
case "embedNavigationController":
self.pauseNavigationController = segue.destination as! UINavigationController
self.pauseNavigationController = segue.destination as? UINavigationController
self.pauseNavigationController.delegate = self
self.pauseNavigationController.navigationBar.tintColor = UIColor.deltaPurple
self.pauseNavigationController.view.backgroundColor = UIColor.clear

View File

@ -63,7 +63,7 @@ class PausePresentationController: UIPresentationController
super.init(presentedViewController: presentedViewController, presenting: presentingViewController)
self.contentView = Bundle.main.loadNibNamed("PausePresentationControllerContentView", owner: self, options: nil)?.first as! UIView
self.contentView = Bundle.main.loadNibNamed("PausePresentationControllerContentView", owner: self, options: nil)?.first as? UIView
}
override func presentationTransitionWillBegin()

View File

@ -86,9 +86,9 @@ extension ControllerInputsViewController
switch identifier
{
case "embedGameViewController": self.gameViewController = segue.destination as! DeltaCore.GameViewController
case "embedGameViewController": self.gameViewController = segue.destination as? DeltaCore.GameViewController
case "embedActionsMenuViewController":
self.actionsMenuViewController = segue.destination as! GridMenuViewController
self.actionsMenuViewController = segue.destination as? GridMenuViewController
self.prepareActionsMenuViewController()
case "cancelControllerInputs": break