Avoid compiler warning.
* nsimage.m (setPixmapData): Rename local variable bmRep to avoid compiler warning.
This commit is contained in:
parent
5fc82109ba
commit
0d48826fd3
2 changed files with 6 additions and 4 deletions
|
@ -4,6 +4,8 @@
|
|||
(dealloc): Release bmRep.
|
||||
(setPixmapData): Make bmRep local so class member is not
|
||||
set (Bug#19133).
|
||||
(setPixmapData): Rename local variable bmRep to avoid compiler
|
||||
warning.
|
||||
|
||||
2014-12-24 Jan Djärv <jan.h.d@swipnet.se>
|
||||
|
||||
|
|
|
@ -351,15 +351,15 @@ - (void) setPixmapData
|
|||
{
|
||||
if ([rep respondsToSelector: @selector (getBitmapDataPlanes:)])
|
||||
{
|
||||
NSBitmapImageRep *bmRep = (NSBitmapImageRep *) rep;
|
||||
NSBitmapImageRep *bmr = (NSBitmapImageRep *) rep;
|
||||
|
||||
if ([bmRep numberOfPlanes] >= 3)
|
||||
[bmRep getBitmapDataPlanes: pixmapData];
|
||||
if ([bmr numberOfPlanes] >= 3)
|
||||
[bmr getBitmapDataPlanes: pixmapData];
|
||||
|
||||
/* The next two lines cause the DPI of the image to be ignored.
|
||||
This seems to be the behavior users expect. */
|
||||
[self setScalesWhenResized: YES];
|
||||
[self setSize: NSMakeSize([bmRep pixelsWide], [bmRep pixelsHigh])];
|
||||
[self setSize: NSMakeSize([bmr pixelsWide], [bmr pixelsHigh])];
|
||||
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue