Minor fixes to #3803 (#3843)

This commit is contained in:
Michał Janiszewski 2016-06-09 00:40:56 +02:00 committed by Ted John
parent 504e5e0720
commit 74780b3e70
2 changed files with 8 additions and 8 deletions

View File

@ -129,7 +129,7 @@ public:
~OpenGLDrawingEngine() override
{
delete _drawingContext;
delete _bits;
delete [] _bits;
SDL_GL_DeleteContext(_context);
}
@ -274,7 +274,7 @@ private:
dst += pitch;
}
}
delete _bits;
delete [] _bits;
}
_bits = newBits;
@ -560,7 +560,7 @@ GLuint OpenGLDrawingContext::LoadImageTexture(uint32 image)
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, pixels32);
delete (uint8 *) pixels32;
delete [] (uint8 *) pixels32;
return texture;
}

View File

@ -69,7 +69,7 @@ public:
~RainDrawer()
{
delete _rainPixels;
delete [] _rainPixels;
}
void SetDPI(rct_drawpixelinfo * dpi)
@ -221,8 +221,8 @@ public:
~SoftwareDrawingEngine() override
{
delete _drawingContext;
delete _dirtyGrid.Blocks;
delete _bits;
delete [] _dirtyGrid.Blocks;
delete [] _bits;
SDL_FreeSurface(_surface);
SDL_FreeSurface(_RGBASurface);
SDL_FreePalette(_palette);
@ -494,7 +494,7 @@ private:
dst += pitch;
}
}
delete _bits;
delete [] _bits;
}
_bits = newBits;
@ -523,7 +523,7 @@ private:
_dirtyGrid.BlockColumns = (_width >> _dirtyGrid.BlockShiftX) + 1;
_dirtyGrid.BlockRows = (_height >> _dirtyGrid.BlockShiftY) + 1;
delete _dirtyGrid.Blocks;
delete [] _dirtyGrid.Blocks;
_dirtyGrid.Blocks = new uint8[_dirtyGrid.BlockColumns * _dirtyGrid.BlockRows];
}