From cd886da2acfaf946723821b7616947af491000c8 Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Tue, 27 May 2008 04:49:08 +0000 Subject: [PATCH] trivial efficiency --- macosx/TorrentCell.m | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/macosx/TorrentCell.m b/macosx/TorrentCell.m index 2914a9a2e..d8408bc7a 100644 --- a/macosx/TorrentCell.m +++ b/macosx/TorrentCell.m @@ -534,31 +534,31 @@ fraction: 1.0]; //reveal button - NSString * revealImageSuffix; + NSString * revealImageString; if (fMouseDownRevealButton) - revealImageSuffix = @"On.png"; + revealImageString = @"RevealOn.png"; else if (!fTracking && fHoverReveal) - revealImageSuffix = @"Hover.png"; + revealImageString = @"RevealHover.png"; else - revealImageSuffix = @"Off.png"; + revealImageString = @"RevealOff.png"; - NSImage * revealImage = [NSImage imageNamed: [@"Reveal" stringByAppendingString: revealImageSuffix]]; + NSImage * revealImage = [NSImage imageNamed: revealImageString]; [revealImage setFlipped: YES]; [revealImage drawInRect: [self revealButtonRectForBounds: cellFrame] fromRect: NSZeroRect operation: NSCompositeSourceOver fraction: 1.0]; //action button - NSString * actionImageSuffix; + NSString * actionImageString; if (fMouseDownActionButton) - actionImageSuffix = @"On.png"; + actionImageString = @"ActionOn.png"; else if (!fTracking && fHoverAction) - actionImageSuffix = @"Hover.png"; + actionImageString = @"ActionHover.png"; else - actionImageSuffix = nil; + actionImageString = nil; - if (actionImageSuffix) + if (actionImageString) { - NSImage * actionImage = [NSImage imageNamed: [@"Action" stringByAppendingString: actionImageSuffix]]; + NSImage * actionImage = [NSImage imageNamed: actionImageString]; [actionImage setFlipped: YES]; [actionImage drawInRect: [self actionButtonRectForBounds: cellFrame] fromRect: NSZeroRect operation: NSCompositeSourceOver fraction: 1.0]; @@ -772,7 +772,7 @@ else pieceColor = fBlue4Color; - //it is faster to just set color instead of checking color + //it's faster to just set color instead of checking previous color [fBitmap setColor: pieceColor atX: i y: 0]; }