فهرست منبع

Library view: use fast enumeration

Gleb Pinigin 12 سال پیش
والد
کامیت
51c1e55420
1فایلهای تغییر یافته به همراه3 افزوده شده و 12 حذف شده
  1. 3 12
      AspenProject/VLCPlaylistViewController.m

+ 3 - 12
AspenProject/VLCPlaylistViewController.m

@@ -220,27 +220,18 @@
     if (_libraryMode == VLCLibraryModeAllAlbums) {
         NSArray *rawAlbums = [MLAlbum allAlbums];
         _foundMedia = [[NSMutableArray alloc] init];
-        NSUInteger count = rawAlbums.count;
-        MLAlbum *album;
-
-        for (NSUInteger x = 0; x < count; x++) {
-            album = rawAlbums[x];
+        for (MLAlbum *album in rawAlbums) {
             if (album.name.length > 0 && album.tracks.count > 0)
                 [_foundMedia addObject:album];
         }
-        rawAlbums = nil;
+
     } else if (_libraryMode == VLCLibraryModeAllSeries) {
         NSArray *rawShows = [MLShow allShows];
         _foundMedia = [[NSMutableArray alloc] init];
-        NSUInteger count = rawShows.count;
-        MLShow *show;
-
-        for (NSUInteger x = 0; x < count; x++) {
-            show = rawShows[x];
+        for (MLShow *show in rawShows) {
             if (show.name.length > 0 && show.episodes.count > 0)
                 [_foundMedia addObject:show];
         }
-        rawShows = nil;
     } else
         _foundMedia = [NSMutableArray arrayWithArray:[MLFile allFiles]];