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