diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-07-11 13:10:06 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-07-11 13:10:06 +0300 |
commit | 0b365e38b6813dc2083e78122d787ec62d7b65cf (patch) | |
tree | d57ea304d51955db9522b6532959285ebce8841e /src | |
parent | 93c54ae82e25a7fbf4616f51e265bd209241c7a2 (diff) | |
download | manaverse-0b365e38b6813dc2083e78122d787ec62d7b65cf.tar.gz manaverse-0b365e38b6813dc2083e78122d787ec62d7b65cf.tar.bz2 manaverse-0b365e38b6813dc2083e78122d787ec62d7b65cf.tar.xz manaverse-0b365e38b6813dc2083e78122d787ec62d7b65cf.zip |
Remove unused code from item class.
Diffstat (limited to 'src')
-rw-r--r-- | src/item.cpp | 16 | ||||
-rw-r--r-- | src/item.h | 7 |
2 files changed, 0 insertions, 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 @@ -70,12 +70,6 @@ class Item { return mImage; } /** - * Returns the item image. - */ - Image *getDrawImage() const A_WARN_UNUSED - { return mDrawImage; } - - /** * Sets the number of items. */ void setQuantity(const int quantity) @@ -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 */ |