diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-10-23 19:50:09 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-10-23 19:50:09 +0300 |
commit | 033a6162914b8f6cdea446751160ca81fbd4c1ca (patch) | |
tree | 88495eb1523c113812f78bdc95ed0816a8ee9e86 /src/render/mobileopenglgraphics.cpp | |
parent | 0dca3216743cd5deaffad45ca50fccd7280eb6bd (diff) | |
download | mv-033a6162914b8f6cdea446751160ca81fbd4c1ca.tar.gz mv-033a6162914b8f6cdea446751160ca81fbd4c1ca.tar.bz2 mv-033a6162914b8f6cdea446751160ca81fbd4c1ca.tar.xz mv-033a6162914b8f6cdea446751160ca81fbd4c1ca.zip |
replace some malloc/free by new/delete.
Diffstat (limited to 'src/render/mobileopenglgraphics.cpp')
-rw-r--r-- | src/render/mobileopenglgraphics.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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<GLubyte*>(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); |