adium 2115:699ae94cb727: Peter points out I can fast enumerate o...
commits at adium.im
commits at adium.im
Thu May 7 04:57:00 UTC 2009
details: http://hg.adium.im/adium/rev/699ae94cb727
revision: 2115:699ae94cb727
author: David Smith <catfish.man at gmail.com>
date: Wed May 06 21:56:53 2009 -0700
Peter points out I can fast enumerate on an enumerator to still cleanly get the skip-first-object behavior here
diffstat:
Source/AIDockController.m | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diffs (13 lines):
diff -r cf518e521776 -r 699ae94cb727 Source/AIDockController.m
--- a/Source/AIDockController.m Wed May 06 21:15:06 2009 -0700
+++ b/Source/AIDockController.m Wed May 06 21:56:53 2009 -0700
@@ -103,8 +103,7 @@
NSArray *stateArrayCopy = [[activeIconStateArray copy] autorelease]; //Work with a copy, since this array will change as we remove states
NSEnumerator *enumerator = [stateArrayCopy objectEnumerator];
[enumerator nextObject]; //Skip the first icon
- NSString *iconState = nil;
- while ((iconState = [enumerator nextObject])) {
+ for (NSString *iconState in enumerator) {
[self removeIconStateNamed:iconState];
}
More information about the commits
mailing list