From 0b365e38b6813dc2083e78122d787ec62d7b65cf Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 11 Jul 2013 13:10:06 +0300 Subject: Remove unused code from item class. --- src/item.cpp | 16 ---------------- src/item.h | 7 ------- 2 files changed, 23 deletions(-) diff --git a/src/item.cpp b/src/item.cpp index f686f5cf6..5f5b7120a 100644 --- a/src/item.cpp +++ b/src/item.cpp @@ -44,7 +44,6 @@ Item::Item(const int id, const int quantity, const int refine, mColor(0), mQuantity(quantity), mImage(nullptr), - mDrawImage(nullptr), mEquipment(equipment), mEquipped(equipped), mInEquipment(false), @@ -63,11 +62,6 @@ Item::~Item() mImage->decRef(); mImage = nullptr; } - if (mDrawImage) - { - mDrawImage->decRef(); - mDrawImage = nullptr; - } dragDrop.clearItem(this); } @@ -82,9 +76,6 @@ void Item::setId(const int id, const unsigned char color) if (mImage) mImage->decRef(); - if (mDrawImage) - mDrawImage->decRef(); - ResourceManager *const resman = ResourceManager::getInstance(); const ItemInfo &info = getInfo(); mTags = info.getTags(); @@ -93,19 +84,12 @@ void Item::setId(const int id, const unsigned char color) "itemIcons").append(info.getDisplay().image), info.getDyeColorsString(color)); mImage = resman->getImage(dye); - mDrawImage = resman->getImage(dye); if (!mImage) { mImage = Theme::getImageFromTheme(paths.getValue("unknownItemFile", "unknown-item.png")); } - - if (!mDrawImage) - { - mDrawImage = Theme::getImageFromTheme( - paths.getValue("unknownItemFile", "unknown-item.png")); - } } bool Item::isHaveTag(const int tagId) diff --git a/src/item.h b/src/item.h index b2004622e..4e1772d2f 100644 --- a/src/item.h +++ b/src/item.h @@ -69,12 +69,6 @@ class Item Image *getImage() const A_WARN_UNUSED { return mImage; } - /** - * Returns the item image. - */ - Image *getDrawImage() const A_WARN_UNUSED - { return mDrawImage; } - /** * Sets the number of items. */ @@ -178,7 +172,6 @@ class Item protected: Image *mImage; /**< Item image. */ - Image *mDrawImage; /**< Draw image. */ bool mEquipment; /**< Item is equipment. */ bool mEquipped; /**< Item is equipped. */ bool mInEquipment; /**< Item is in equipment */ -- cgit v1.2.3-70-g09d2