From 964ffbb9b6ed5246b14a7d0c0d065f7d38af0912 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 27 Mar 2011 21:41:20 +0300 Subject: Fix some warnings and improve code from gcc 4.6 compilation. --- src/gui/itempopup.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/gui/itempopup.cpp') diff --git a/src/gui/itempopup.cpp b/src/gui/itempopup.cpp index 493b5041a..e09d0ce0a 100644 --- a/src/gui/itempopup.cpp +++ b/src/gui/itempopup.cpp @@ -116,8 +116,8 @@ void ItemPopup::setItem(const Item *item, bool showImage) ii.getName().c_str(), item->getRefine(), ii.getId())); } mItemName->adjustSize(); - int minWidth = mItemName->getWidth() + 8; - if (getWidth() < minWidth) + unsigned minWidth = mItemName->getWidth() + 8; + if ((unsigned)getWidth() < minWidth) setWidth(minWidth); } } @@ -256,6 +256,10 @@ gcn::Color ItemPopup::getColor(ItemType type) return Theme::getThemeColor(Theme::FEET); case ITEM_EQUIPMENT_AMMO: return Theme::getThemeColor(Theme::AMMO); + case ITEM_EQUIPMENT_CHARM: + return Theme::getThemeColor(Theme::CHARM); + case ITEM_SPRITE_RACE: + case ITEM_SPRITE_HAIR: default: return Theme::getThemeColor(Theme::UNKNOWN_ITEM); } -- cgit v1.2.3-60-g2f50