mirror of
https://github.com/mkxp-z/mkxp-z.git
synced 2025-04-21 21:52: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.loop = other.getLooping();
|
||||
|
||||
char *tmp = new char[p->animation.width * p->animation.height * 4];
|
||||
for (TEXFBO &sourceframe : other.getFrames()) {
|
||||
TEXFBO newframe;
|
||||
try {
|
||||
|
@ -677,7 +676,6 @@ Bitmap::Bitmap(const Bitmap &other, int frame)
|
|||
} catch(const Exception &e) {
|
||||
for (TEXFBO &f : p->animation.frames)
|
||||
shState->texPool().release(f);
|
||||
delete[] tmp;
|
||||
throw e;
|
||||
}
|
||||
|
||||
|
@ -688,7 +686,6 @@ Bitmap::Bitmap(const Bitmap &other, int frame)
|
|||
|
||||
p->animation.frames.push_back(newframe);
|
||||
}
|
||||
delete[] tmp;
|
||||
}
|
||||
|
||||
p->addTaintedArea(rect());
|
||||
|
|
Loading…
Add table
Reference in a new issue