From 033a6162914b8f6cdea446751160ca81fbd4c1ca Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 23 Oct 2013 19:50:09 +0300 Subject: replace some malloc/free by new/delete. --- src/render/mobileopenglgraphics.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/render/mobileopenglgraphics.cpp') diff --git a/src/render/mobileopenglgraphics.cpp b/src/render/mobileopenglgraphics.cpp index 91184958b..ce930f416 100644 --- a/src/render/mobileopenglgraphics.cpp +++ b/src/render/mobileopenglgraphics.cpp @@ -906,7 +906,7 @@ SDL_Surface* MobileOpenGLGraphics::getScreenshot() SDL_LockSurface(screenshot); const unsigned int lineSize = 3 * w; - GLubyte *const buf = static_cast(malloc(lineSize)); + GLubyte *const buf = new GLubyte[lineSize]; if (!buf) return nullptr; @@ -929,7 +929,7 @@ SDL_Surface* MobileOpenGLGraphics::getScreenshot() memcpy(bot, buf, lineSize); } - free(buf); + delete [] buf; if (config.getBoolValue("usefbo")) graphicsManager.deleteFBO(&mFbo); -- cgit v1.2.3-60-g2f50