Skip to content

Commit

Permalink
avoid unnecessary alloc for pixmap
Browse files Browse the repository at this point in the history
  • Loading branch information
MoAlyousef committed Jul 10, 2024
1 parent d027944 commit f667851
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cfl_image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ int Fl_Anim_GIF_Image_playing(const Fl_Anim_GIF_Image *self) {
IMAGE_DEFINE(Fl_Pixmap)

Fl_Pixmap *Fl_Pixmap_new(const char *const *D) {
LOCK(auto temp = new Fl_Pixmap(D); auto ret = temp->copy(temp->w(), temp->h()); delete temp);
LOCK(Fl_Pixmap temp(D); auto ret = temp.copy(temp.w(), temp.h()));
return (Fl_Pixmap *)ret;
}

Expand Down

0 comments on commit f667851

Please sign in to comment.