[vlc-commits] macosx: SPMediaKeyTap: Remove unnecessary ivar initialization

Marvin Scholz git at videolan.org
Wed Aug 1 22:00:44 CEST 2018


vlc | branch: master | Marvin Scholz <epirat07 at gmail.com> | Wed Aug  1 21:16:43 2018 +0200| [f68c20980075b4b8387b7b7174affd7c7023aa98] | committer: Marvin Scholz

macosx: SPMediaKeyTap: Remove unnecessary ivar initialization

Instance variables are automatically initialized with 0 or nil.

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

 modules/gui/macosx/SPMediaKeyTap.m | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/modules/gui/macosx/SPMediaKeyTap.m b/modules/gui/macosx/SPMediaKeyTap.m
index 8b9d9fe4bb..275b34c212 100644
--- a/modules/gui/macosx/SPMediaKeyTap.m
+++ b/modules/gui/macosx/SPMediaKeyTap.m
@@ -58,13 +58,13 @@ static CGEventRef tapEventCallback(CGEventTapProxy proxy, CGEventType type, CGEv
 #pragma mark Setup and teardown
 - (id)initWithDelegate:(id)delegate
 {
-    _delegate = delegate;
-    [self startWatchingAppSwitching];
-    singleton = self;
-    _mediaKeyAppList = [NSMutableArray new];
-    _tapThreadRL=nil;
-    _eventPort=nil;
-    _eventPortSource=nil;
+    self = [super init];
+    if (self) {
+        _delegate = delegate;
+        [self startWatchingAppSwitching];
+        singleton = self;
+        _mediaKeyAppList = [NSMutableArray new];
+    }
     return self;
 }
 



More information about the vlc-commits mailing list