From 4f9bbd2262cb8fd16ce55a46e2749e77d5745b09 Mon Sep 17 00:00:00 2001 From: Jens Ayton Date: Tue, 22 Jun 2010 20:40:12 +0000 Subject: [PATCH] Tiny cleanup. git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3590 127b21dd-08f5-0310-b4b7-95ae10353056 --- src/Core/GameController.m | 3 +-- src/Core/Universe.m | 5 ++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/Core/GameController.m b/src/Core/GameController.m index e2442a3c..481d2a11 100644 --- a/src/Core/GameController.m +++ b/src/Core/GameController.m @@ -617,8 +617,7 @@ static NSComparisonResult CompareDisplayModes(id arg1, id arg2, void *context) // Create an NSOpenGLContext with the FullScreen pixel format. By specifying the non-FullScreen context as our "shareContext", we automatically inherit all of the textures, display lists, and other OpenGL objects it has defined. fullScreenContext = [[NSOpenGLContext alloc] initWithFormat:pixelFormat shareContext:[gameView openGLContext]]; - [pixelFormat release]; - pixelFormat = nil; + DESTROY(pixelFormat); if (fullScreenContext == nil) { diff --git a/src/Core/Universe.m b/src/Core/Universe.m index 107b6b0e..d4c991d7 100644 --- a/src/Core/Universe.m +++ b/src/Core/Universe.m @@ -944,15 +944,14 @@ static OOComparisonResult comparePrice(id dict1, id dict2, void * context); if (![a_station isStation] || ![a_station validForAddToUniverse]) { OOLog(@"universe.setup.badStation", @"Could not create built-in Coriolis station! Generating a stationless system."); - [a_station release]; - a_station = nil; + DESTROY(a_station); } } } if (a_station != nil) { - [a_station setOrientation: q_station]; + [a_station setOrientation:q_station]; [a_station setPosition: stationPos]; [a_station setPitch: 0.0]; [a_station setScanClass: CLASS_STATION];