To jacek:
if (mPixmapItem[i]->getPixmapName() == pixmapName
&&
mPixmapItem[i]->width() == pixmap.width()
&&
mPixmapItem[i]->height() == pixmap.height())
{
ZeLog::get()->Print("ZePixmapManager - DeletePixmap instance %d\n",
mPixmapItem[i]->getInstance());
mPixmapItem[i]->deleteInstance();
if (mPixmapItem[i]->getInstance() == 0)
{
ZeLog::get()->Print("ZePixmapManager - DeletePixmap complete\n");
delete mPixmapItem[i];
mPixmapItem.remove(i);
}
return true;
}
if (mPixmapItem[i]->getPixmapName() == pixmapName
&&
mPixmapItem[i]->width() == pixmap.width()
&&
mPixmapItem[i]->height() == pixmap.height())
{
ZeLog::get()->Print("ZePixmapManager - DeletePixmap instance %d\n",
mPixmapItem[i]->getInstance());
mPixmapItem[i]->deleteInstance();
if (mPixmapItem[i]->getInstance() == 0)
{
ZeLog::get()->Print("ZePixmapManager - DeletePixmap complete\n");
delete mPixmapItem[i];
mPixmapItem.remove(i);
}
return true;
}
To copy to clipboard, switch view to plain text mode
I see what you mean, even though I'm not sure that's an issue since I'm returning true right after deleting an item, so the rest of the list is never checked.
Bookmarks