Local integer vector.

This commit is contained in:
2025-08-04 10:35:37 -04:00
parent fb5c4c762a
commit 8a3e2aae1c

View File

@ -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)