adium 2105:03fdedb44c06: A bit more. Getting bored now, so this ...
commits at adium.im
commits at adium.im
Thu May 7 00:49:33 UTC 2009
details: http://hg.adium.im/adium/rev/03fdedb44c06
revision: 2105:03fdedb44c06
author: David Smith <catfish.man at gmail.com>
date: Wed May 06 17:49:26 2009 -0700
A bit more. Getting bored now, so this is probably the last for a little while
diffstat:
Frameworks/Adium Framework/Source/AIMetaContact.m | 6 ++----
Source/AIListWindowController.m | 14 +++-----------
2 files changed, 5 insertions(+), 15 deletions(-)
diffs (43 lines):
diff -r 03c251eb0963 -r 03fdedb44c06 Frameworks/Adium Framework/Source/AIMetaContact.m
--- a/Frameworks/Adium Framework/Source/AIMetaContact.m Wed May 06 17:38:16 2009 -0700
+++ b/Frameworks/Adium Framework/Source/AIMetaContact.m Wed May 06 17:49:26 2009 -0700
@@ -779,12 +779,10 @@
if (!userIcon) {
NSArray *theContainedObjects = self.uniqueContainedObjects;
- unsigned int count = [theContainedObjects count];
- unsigned int i = 0;
- while ((i < count) && !userIcon) {
+ NSUInteger count = [theContainedObjects count];
+ for (NSUInteger i = 0; i < count && !userIcon; i++) {
sourceListObject = [theContainedObjects objectAtIndex:i];
userIcon = [sourceListObject userIcon];
- i++;
}
}
diff -r 03c251eb0963 -r 03fdedb44c06 Source/AIListWindowController.m
--- a/Source/AIListWindowController.m Wed May 06 17:38:16 2009 -0700
+++ b/Source/AIListWindowController.m Wed May 06 17:49:26 2009 -0700
@@ -867,18 +867,10 @@
// note: may be inaccurate when mouse is up against an edge
- (NSScreen *)screenForPoint:(NSPoint)point
{
- NSScreen *pointScreen = nil;
-
- NSEnumerator *screenEnumerator = [[NSScreen screens] objectEnumerator];
- NSScreen *screen;
- while ((screen = [screenEnumerator nextObject]) != nil) {
- if (NSPointInRect(point, NSInsetRect([screen frame], -1, -1))) {
- pointScreen = screen;
- break;
- }
+ for (NSScreen *pointScreen in [NSScreen screens]) {
+ if (NSPointInRect(point, NSInsetRect([screen frame], -1, -1)))
+ return pointScreen;
}
-
- return pointScreen;
}
- (NSRect)squareRectWithCenter:(NSPoint)point sideLength:(CGFloat)sideLength
More information about the commits
mailing list