[vlc-commits] macosx: remove write-only variables

Felix Paul Kühne git at videolan.org
Sun Sep 23 19:45:19 CEST 2018


vlc/vlc-3.0 | branch: master | Felix Paul Kühne <felix at feepk.net> | Sat Jun  9 16:14:33 2018 +0200| [17b70071b08770c47b9d13272956e0bc7005bb50] | committer: Felix Paul Kühne

macosx: remove write-only variables

(cherry picked from commit 1e03d06491e5da4278a2423d2ecd11932b002cff)

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

 modules/gui/macosx/VLCPlaylist.m      | 2 +-
 modules/gui/macosx/VLCPlaylistInfo.m  | 4 ++--
 modules/gui/macosx/VLCStringUtility.m | 5 ++---
 modules/gui/macosx/applescript.m      | 3 ---
 4 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/modules/gui/macosx/VLCPlaylist.m b/modules/gui/macosx/VLCPlaylist.m
index 8a881d7650..a6226de496 100644
--- a/modules/gui/macosx/VLCPlaylist.m
+++ b/modules/gui/macosx/VLCPlaylist.m
@@ -705,9 +705,9 @@
 - (void)outlineView:(NSOutlineView *)outlineView didClickTableColumn:(NSTableColumn *)aTableColumn
 {
     int type = 0;
-    intf_thread_t *p_intf = getIntf();
     NSString * identifier = [aTableColumn identifier];
 
+    intf_thread_t *p_intf = getIntf();
     playlist_t *p_playlist = pl_Get(p_intf);
 
     if (_sortTableColumn == aTableColumn)
diff --git a/modules/gui/macosx/VLCPlaylistInfo.m b/modules/gui/macosx/VLCPlaylistInfo.m
index e46b0f13bd..ef9817ff47 100644
--- a/modules/gui/macosx/VLCPlaylistInfo.m
+++ b/modules/gui/macosx/VLCPlaylistInfo.m
@@ -368,8 +368,8 @@ FREENULL( psz_##foo );
 
 - (IBAction)downloadCoverArt:(id)sender
 {
-    playlist_t *p_playlist = pl_Get(getIntf());
-    if (p_item) libvlc_ArtRequest(getIntf()->obj.libvlc, p_item, META_REQUEST_OPTION_NONE);
+    if (p_item)
+        libvlc_ArtRequest(getIntf()->obj.libvlc, p_item, META_REQUEST_OPTION_NONE);
 }
 
 @end
diff --git a/modules/gui/macosx/VLCStringUtility.m b/modules/gui/macosx/VLCStringUtility.m
index 4487187659..2a083fa57c 100644
--- a/modules/gui/macosx/VLCStringUtility.m
+++ b/modules/gui/macosx/VLCStringUtility.m
@@ -70,7 +70,6 @@ NSString *const kVLCMediaUnknown = @"Unknown";
     NSMutableString *o_wrapped;
     NSString *o_out_string;
     NSRange glyphRange, effectiveRange, charRange;
-    NSRect lineFragmentRect;
     unsigned glyphIndex, breaksInserted = 0;
 
     NSTextStorage *o_storage = [[NSTextStorage alloc] initWithString: o_in_string
@@ -88,8 +87,8 @@ NSString *const kVLCMediaUnknown = @"Unknown";
 
     for (glyphIndex = glyphRange.location ; glyphIndex < NSMaxRange(glyphRange) ;
         glyphIndex += effectiveRange.length) {
-        lineFragmentRect = [o_layout_manager lineFragmentRectForGlyphAtIndex: glyphIndex
-                                                              effectiveRange: &effectiveRange];
+        [o_layout_manager lineFragmentRectForGlyphAtIndex: glyphIndex
+                                           effectiveRange: &effectiveRange];
         charRange = [o_layout_manager characterRangeForGlyphRange: effectiveRange
                                                  actualGlyphRange: &effectiveRange];
         if ([o_wrapped lineRangeForRange:
diff --git a/modules/gui/macosx/applescript.m b/modules/gui/macosx/applescript.m
index 8a5a124082..c9cd505eae 100644
--- a/modules/gui/macosx/applescript.m
+++ b/modules/gui/macosx/applescript.m
@@ -68,9 +68,6 @@
     NSString *o_command = [[self commandDescription] commandName];
     NSString *o_parameter = [self directParameter];
 
-    intf_thread_t * p_intf = getIntf();
-    playlist_t * p_playlist = pl_Get(p_intf);
-
     if ([o_command isEqualToString:@"play"])
         [[VLCCoreInteraction sharedInstance] playOrPause];
     else if ([o_command isEqualToString:@"stop"])



More information about the vlc-commits mailing list