removed strange "warning: converting negative value 'B_ERROR' to 'long unsigned int'" that seemed to be generated by the ? operator converting B_ERROR's type.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19772 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
d1b0be94b0
commit
d359899a21
|
@ -684,6 +684,9 @@ SGIImage::_ReadRLE8(uint8* row, uint8* rleBuffer, int32 numPixels) const
|
|||
uint32 count; // RLE count
|
||||
uint32 length = 0; // number of bytes read
|
||||
|
||||
if (numPixels <= 0)
|
||||
return B_ERROR;
|
||||
|
||||
while (numPixels > 0) {
|
||||
|
||||
ch = *rleBuffer ++;
|
||||
|
@ -713,7 +716,7 @@ SGIImage::_ReadRLE8(uint8* row, uint8* rleBuffer, int32 numPixels) const
|
|||
}
|
||||
}
|
||||
|
||||
return (numPixels > 0 ? B_ERROR : length);
|
||||
return length;
|
||||
}
|
||||
/*ssize_t
|
||||
SGIImage::_ReadRLE8(uint8* row, int32 numPixels) const
|
||||
|
@ -851,6 +854,9 @@ SGIImage::_ReadRLE16(uint16* row, uint16* rleBuffer, int32 numPixels) const
|
|||
uint32 count; // RLE count
|
||||
uint32 length = 0; // number of bytes read...
|
||||
|
||||
if (numPixels <= 0)
|
||||
return B_ERROR;
|
||||
|
||||
while (numPixels > 0) {
|
||||
|
||||
ch = *rleBuffer ++;
|
||||
|
@ -879,7 +885,7 @@ SGIImage::_ReadRLE16(uint16* row, uint16* rleBuffer, int32 numPixels) const
|
|||
}
|
||||
}
|
||||
}
|
||||
return (numPixels > 0 ? B_ERROR : length * 2);
|
||||
return length * 2;
|
||||
}
|
||||
|
||||
// _WriteRLE8
|
||||
|
|
Loading…
Reference in New Issue