Adium

Changeset 23376

Show
Ignore:
Timestamp:
05/09/2008 12:27:21 PM (7 months ago)
Author:
evands
Message:

Peter discovered the source of an images bug in Growl and fixed it in Growl's revision 4820. The code in question is similar to our largestBitmapImageRep method... and ours had the same problem. Common factor? Me. ;) Good work, Peter.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Frameworks/AIUtilities Framework/Source/AIImageAdditions.m

    r22589 r23376  
    100100        while ((rep = [repsEnum nextObject])) { 
    101101                if ([rep isKindOfClass:NSBitmapImageRepClass]) { 
    102                         if ([rep size].width >= maxWidth) { 
     102                        float thisWidth = [rep size].width; 
     103                        if (thisWidth >= maxWidth) { 
    103104                                //Cast explanation: GCC warns about us returning an NSImageRep here, presumably because it could be some other kind of NSImageRep if we don't check the class. Fortunately, we have such a check. This cast silences the warning. 
    104105                                bestRep = (NSBitmapImageRep *)rep; 
     106                                maxWidth = thisWidth; 
    105107                        } 
    106108                }