Commit 759bad2a authored by Mike JS. Choi's avatar Mike JS. Choi Committed by Carola Nitz

VLCMediaList: Update indexOfMedia

- Returns NSUInteger instead of NSInteger
- Returns NSNotFound if media is not found
parent 005bcd70
......@@ -123,9 +123,10 @@ extern NSString *const VLCMediaListItemDeleted;
* retrieve the position of a media item
*
* \param media the media object to search for
* \return the index position of the media in the list or -1 if not found
* \return The lowest index of the provided media in the list
* If media does not exist in the list, returns NSNotFound.
*/
- (NSInteger)indexOfMedia:(VLCMedia *)media;
- (NSUInteger)indexOfMedia:(VLCMedia *)media;
/* Properties */
/**
......
......@@ -185,10 +185,9 @@ static void HandleMediaListItemDeleted( const libvlc_event_t * event, void * use
return media;
}
- (NSInteger)indexOfMedia:(VLCMedia *)media
- (NSUInteger)indexOfMedia:(VLCMedia *)media
{
NSInteger result = libvlc_media_list_index_of_item(p_mlist, [media libVLCMediaDescriptor]);
return result;
return [_mediaObjects indexOfObject:media];
}
/* KVC Compliance: For the @"media" key */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment