diff --git a/dw/fltkimgbuf.cc b/dw/fltkimgbuf.cc index 3b6bb57..9c8ce2b 100644 --- a/dw/fltkimgbuf.cc +++ b/dw/fltkimgbuf.cc @@ -323,7 +323,7 @@ inline void FltkImgbuf::scaleBuffer (const core::byte *src, int srcWidth, gammaMap2 = findGammaCorrectionTable (1 / gamma); } - int *v = new int[bpp]; + std::vector< int > v( bpp ); for(int x = 0; x < destWidth; x++) { for(int y = 0; y < destHeight; y++) { int xo1 = x * srcWidth / destWidth; @@ -349,7 +349,6 @@ inline void FltkImgbuf::scaleBuffer (const core::byte *src, int srcWidth, scaleMode == BEAUTIFUL_GAMMA ? gammaMap1[v[i] / n] : v[i] / n; } } - delete[] v; } void FltkImgbuf::copyRow (int row, const core::byte *data)