- code cleanup based on additional gcc warnings
This commit is contained in:
parent
9268aaf279
commit
4a4c7fbfde
|
@ -52,7 +52,7 @@ public:
|
|||
static uint64 getFlags() { return flags; }
|
||||
|
||||
static void setFlag(GlobalStaticFlagTypes flag) { flags |= flag; }
|
||||
static bool isFlagSet(GlobalStaticFlagTypes flag) { return (flags & flag) == flag; }
|
||||
static bool isFlagSet(GlobalStaticFlagTypes flag) { return (flags & (unsigned int)flag) == flag; }
|
||||
|
||||
protected:
|
||||
static bool isNonGraphicalMode;
|
||||
|
|
|
@ -976,22 +976,22 @@ void Pixmap2D::Scale(int format, int newW, int newH) {
|
|||
uint8 *newpixels= new uint8[newW * newH * useComponents];
|
||||
|
||||
glPixelStorei(GL_PACK_ALIGNMENT, 1);
|
||||
int error = gluScaleImage( format,
|
||||
GLenum glErr = gluScaleImage( format,
|
||||
w, h, GL_UNSIGNED_BYTE, pixels,
|
||||
newW, newH, GL_UNSIGNED_BYTE, newpixels);
|
||||
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
|
||||
|
||||
if(error == GL_NO_ERROR) {
|
||||
if(glErr == GL_NO_ERROR) {
|
||||
init(newW,newH,this->components);
|
||||
pixels = newpixels;
|
||||
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("Scaled image from [%d x %d] to [%d x %d]\n",originalW,originalH,w,h);
|
||||
}
|
||||
else {
|
||||
const char *errorString= reinterpret_cast<const char*>(gluErrorString(error));
|
||||
printf("ERROR Scaling image from [%d x %d] to [%d x %d] error: %d [%s]\n",originalW,originalH,w,h,error,errorString);
|
||||
const char *errorString= reinterpret_cast<const char*>(gluErrorString(glErr));
|
||||
printf("ERROR Scaling image from [%d x %d] to [%d x %d] error: %u [%s]\n",originalW,originalH,w,h,glErr,errorString);
|
||||
|
||||
assertGlWithErrorNumber(error);
|
||||
assertGlWithErrorNumber(glErr);
|
||||
}
|
||||
|
||||
CalculatePixelsCRC(pixels,getPixelByteCount(), crc);
|
||||
|
|
Loading…
Reference in New Issue