Revision: 5944
http://skim-app.svn.sourceforge.net/skim-app/?rev=5944&view=rev
Author: hofman
Date: 2009-10-24 12:32:36 +0000 (Sat, 24 Oct 2009)
Log Message:
-----------
use fast enumeration
Modified Paths:
--------------
trunk/SKApplicationController.m
Modified: trunk/SKApplicationController.m
===================================================================
--- trunk/SKApplicationController.m 2009-10-23 22:57:48 UTC (rev 5943)
+++ trunk/SKApplicationController.m 2009-10-24 12:32:36 UTC (rev 5944)
@@ -334,13 +334,12 @@
if ([bm isKindOfClass:[SKBookmark class]]) {
NSArray *bookmarks = [bm children];
- NSInteger i = [menu numberOfItems], numBookmarks = [bookmarks count];
+ NSInteger i = [menu numberOfItems];
while (i-- > 0 && ([[menu itemAtIndex:i] isSeparatorItem] || [[menu
itemAtIndex:i] representedObject]))
[menu removeItemAtIndex:i];
- if ([menu numberOfItems] > 0 && numBookmarks > 0)
+ if ([menu numberOfItems] > 0 && [bookmarks count] > 0)
[menu addItem:[NSMenuItem separatorItem]];
- for (i = 0; i < numBookmarks; i++) {
- bm = [bookmarks objectAtIndex:i];
+ for (bm in bookmarks) {
switch ([bm bookmarkType]) {
case SKBookmarkTypeFolder:
item = [menu addItemWithTitle:[bm label] submenu:[[[NSMenu
allocWithZone:[NSMenu menuZone]] initWithTitle:[bm label]] autorelease]];
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit