From Marco Jez, fixed constness of data return type

This commit is contained in:
Robert Osfield 2005-03-23 21:00:28 +00:00
parent 9e54b00205
commit 2ab78cfe38
2 changed files with 2 additions and 2 deletions

View File

@ -179,7 +179,7 @@ class SG_EXPORT Image : public Object
return _data+(column*getPixelSizeInBits())/8+row*getRowSizeInBytes()+image*getImageSizeInBytes();
}
inline unsigned char* data(int column, int row=0,int image=0) const
inline const unsigned char* data(int column, int row=0,int image=0) const
{
if (!_data) return NULL;
return _data+(column*getPixelSizeInBits())/8+row*getRowSizeInBytes()+image*getImageSizeInBytes();

View File

@ -885,7 +885,7 @@ bool Image::isImageTranslucent() const
{
for(int it=0;it<t();++it)
{
unsigned char* d = data(0,it,ir);
const unsigned char* d = data(0,it,ir);
switch(_dataType)
{
case(GL_BYTE): return _findLowerAlphaValueInRow(s(), (char*)d +offset, (char)127, delta);