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

Marvin Scholz git at videolan.org
Fri Aug 3 01:45:53 CEST 2018


vlc/vlc-3.0 | branch: master | Marvin Scholz <epirat07 at gmail.com> | Wed Aug  1 21:16:43 2018 +0200| [37d3f6adae185ce4dd0d8df682daefa514c378e8] | committer: Felix Paul Kühne

macosx: SPMediaKeyTap: Remove unnecessary ivar initialization

Instance variables are automatically initialized with 0 or nil.

(cherry picked from commit f68c20980075b4b8387b7b7174affd7c7023aa98)
Signed-off-by: Felix Paul Kühne <felix at feepk.net>

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

 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