[vlc-commits] macosx/playlist model: fix getter for number of items
Felix Paul Kühne
git at videolan.org
Thu Feb 7 14:33:46 CET 2019
vlc | branch: master | Felix Paul Kühne <felix at feepk.net> | Thu Feb 7 14:33:22 2019 +0100| [0ea8f755d3bb24c41794f734f6afd9ebdc6a9acb] | committer: Felix Paul Kühne
macosx/playlist model: fix getter for number of items
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0ea8f755d3bb24c41794f734f6afd9ebdc6a9acb
---
modules/gui/macosx/playlist/VLCPlaylistModel.h | 2 +-
modules/gui/macosx/playlist/VLCPlaylistModel.m | 10 ++--------
2 files changed, 3 insertions(+), 9 deletions(-)
diff --git a/modules/gui/macosx/playlist/VLCPlaylistModel.h b/modules/gui/macosx/playlist/VLCPlaylistModel.h
index f55d9f6a10..ea570580fe 100644
--- a/modules/gui/macosx/playlist/VLCPlaylistModel.h
+++ b/modules/gui/macosx/playlist/VLCPlaylistModel.h
@@ -31,7 +31,7 @@ NS_ASSUME_NONNULL_BEGIN
@interface VLCPlaylistModel : NSObject
@property (readwrite, assign) VLCPlaylistController *playlistController;
- at property (readonly) size_t numberOfPlaylistItems;
+ at property (readonly) NSUInteger numberOfPlaylistItems;
- (void)dropExistingData;
- (VLCPlaylistItem *)playlistItemAtIndex:(NSInteger)index;
diff --git a/modules/gui/macosx/playlist/VLCPlaylistModel.m b/modules/gui/macosx/playlist/VLCPlaylistModel.m
index ef0e285d06..7b10022490 100644
--- a/modules/gui/macosx/playlist/VLCPlaylistModel.m
+++ b/modules/gui/macosx/playlist/VLCPlaylistModel.m
@@ -44,15 +44,9 @@
return self;
}
-- (size_t)numberOfPlaylistItems
+- (NSUInteger)numberOfPlaylistItems
{
- size_t ret = 0;
-
- vlc_playlist_t *p_playlist = self.playlistController.p_playlist;
-
- ret = vlc_playlist_Count(p_playlist);
-
- return ret;
+ return _playlistArray.count;
}
- (void)dropExistingData
More information about the vlc-commits
mailing list