[vlc-commits] macosx: simplifications

David Fuhrmann git at videolan.org
Wed Apr 2 15:01:52 CEST 2014


vlc | branch: master | David Fuhrmann <dfuhrmann at videolan.org> | Wed Apr  2 15:01:22 2014 +0200| [4d69a4c57a9b012d236546b165901dff7719624a] | committer: David Fuhrmann

macosx: simplifications

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4d69a4c57a9b012d236546b165901dff7719624a
---

 modules/gui/macosx/intf.m |   24 +++++-------------------
 1 file changed, 5 insertions(+), 19 deletions(-)

diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m
index 2e82246..602b454 100644
--- a/modules/gui/macosx/intf.m
+++ b/modules/gui/macosx/intf.m
@@ -1575,10 +1575,7 @@ static VLCMain *_o_sharedMainInstance = nil;
 
 - (id)controls
 {
-    if (o_controls)
-        return o_controls;
-
-    return nil;
+    return o_controls;
 }
 
 - (id)bookmarks
@@ -1594,9 +1591,6 @@ static VLCMain *_o_sharedMainInstance = nil;
 
 - (id)open
 {
-    if (!o_open)
-        return nil;
-
     if (!nib_open_loaded)
         nib_open_loaded = [NSBundle loadNibNamed:@"Open" owner: NSApp];
 
@@ -1627,10 +1621,7 @@ static VLCMain *_o_sharedMainInstance = nil;
 
 - (id)playlist
 {
-    if (o_playlist)
-        return o_playlist;
-
-    return nil;
+    return o_playlist;
 }
 
 - (id)info
@@ -1638,10 +1629,7 @@ static VLCMain *_o_sharedMainInstance = nil;
     if (! nib_info_loaded)
         nib_info_loaded = [NSBundle loadNibNamed:@"MediaInfo" owner: NSApp];
 
-    if (o_info)
-        return o_info;
-
-    return nil;
+    return o_info;
 }
 
 - (id)wizard
@@ -1653,6 +1641,7 @@ static VLCMain *_o_sharedMainInstance = nil;
         nib_wizard_loaded = [NSBundle loadNibNamed:@"Wizard" owner: NSApp];
         [o_wizard initStrings];
     }
+
     return o_wizard;
 }
 
@@ -1667,10 +1656,7 @@ static VLCMain *_o_sharedMainInstance = nil;
 
 - (id)eyeTVController
 {
-    if (o_eyetv)
-        return o_eyetv;
-
-    return nil;
+    return o_eyetv;
 }
 
 - (id)appleRemoteController



More information about the vlc-commits mailing list