mirror of
https://github.com/mkxp-z/mkxp-z.git
synced 2025-04-22 06:02:04 +02:00
remove unnecessary buffer allocation
This commit is contained in:
parent
67c158e418
commit
bfc04a9fdc
1 changed files with 0 additions and 3 deletions
|
@ -669,7 +669,6 @@ Bitmap::Bitmap(const Bitmap &other, int frame)
|
||||||
p->animation.lastFrame = 0;
|
p->animation.lastFrame = 0;
|
||||||
p->animation.loop = other.getLooping();
|
p->animation.loop = other.getLooping();
|
||||||
|
|
||||||
char *tmp = new char[p->animation.width * p->animation.height * 4];
|
|
||||||
for (TEXFBO &sourceframe : other.getFrames()) {
|
for (TEXFBO &sourceframe : other.getFrames()) {
|
||||||
TEXFBO newframe;
|
TEXFBO newframe;
|
||||||
try {
|
try {
|
||||||
|
@ -677,7 +676,6 @@ Bitmap::Bitmap(const Bitmap &other, int frame)
|
||||||
} catch(const Exception &e) {
|
} catch(const Exception &e) {
|
||||||
for (TEXFBO &f : p->animation.frames)
|
for (TEXFBO &f : p->animation.frames)
|
||||||
shState->texPool().release(f);
|
shState->texPool().release(f);
|
||||||
delete[] tmp;
|
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -688,7 +686,6 @@ Bitmap::Bitmap(const Bitmap &other, int frame)
|
||||||
|
|
||||||
p->animation.frames.push_back(newframe);
|
p->animation.frames.push_back(newframe);
|
||||||
}
|
}
|
||||||
delete[] tmp;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
p->addTaintedArea(rect());
|
p->addTaintedArea(rect());
|
||||||
|
|
Loading…
Add table
Reference in a new issue