summaryrefslogtreecommitdiff
path: root/src/gui/popups
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/popups')
-rw-r--r--src/gui/popups/itempopup.cpp6
-rw-r--r--src/gui/popups/popupmenu.cpp14
2 files changed, 10 insertions, 10 deletions
diff --git a/src/gui/popups/itempopup.cpp b/src/gui/popups/itempopup.cpp
index 8f8a07b71..f0ab5d167 100644
--- a/src/gui/popups/itempopup.cpp
+++ b/src/gui/popups/itempopup.cpp
@@ -138,19 +138,19 @@ void ItemPopup::setItem(const Item *const item,
{
mItemName->setCaption(strprintf("%s (+%u), %d",
ii.getName(item->getColor()).c_str(),
- static_cast<unsigned int>(item->getRefine()),
+ CAST_U32(item->getRefine()),
ii.getId()));
}
else
{
mItemName->setCaption(strprintf("%s (+%u), %d",
ii.getName().c_str(),
- static_cast<unsigned int>(item->getRefine()),
+ CAST_U32(item->getRefine()),
ii.getId()));
}
mItemName->adjustSize();
const unsigned minWidth = mItemName->getWidth() + 8;
- if (static_cast<unsigned>(getWidth()) < minWidth)
+ if (CAST_U32(getWidth()) < minWidth)
setWidth(minWidth);
}
}
diff --git a/src/gui/popups/popupmenu.cpp b/src/gui/popups/popupmenu.cpp
index e319ba7fd..b9fc252b8 100644
--- a/src/gui/popups/popupmenu.cpp
+++ b/src/gui/popups/popupmenu.cpp
@@ -441,7 +441,7 @@ void PopupMenu::showPopup(const int x, const int y,
if (being && !being->getName().empty())
{
mBrowserBox->addRow(strprintf("@@player_%u|%s >@@",
- static_cast<unsigned>(being->getId()), (being->getName()
+ CAST_U32(being->getId()), (being->getName()
+ being->getGenderSignWithSpace()).c_str()));
}
else if (actor->getType() == ActorType::FloorItem)
@@ -449,7 +449,7 @@ void PopupMenu::showPopup(const int x, const int y,
const FloorItem *const floorItem
= static_cast<const FloorItem*>(actor);
mBrowserBox->addRow(strprintf("@@flooritem_%u|%s >@@",
- static_cast<unsigned>(actor->getId()),
+ CAST_U32(actor->getId()),
floorItem->getName().c_str()));
}
}
@@ -799,7 +799,7 @@ void PopupMenu::showChatPopup(const int x, const int y, ChatTab *const tab)
mBrowserBox->addRow("disable away", _("Disable away"));
}
mBrowserBox->addRow("##3---");
- if (tab->getType() == static_cast<int>(ChatTabType::PARTY))
+ if (tab->getType() == CAST_S32(ChatTabType::PARTY))
{
// TRANSLATORS: popup menu item
// TRANSLATORS: enable away messages in chat tab
@@ -1041,11 +1041,11 @@ void PopupMenu::handleLink(const std::string &link,
if (specialLayer)
{
const bool isHome = (mMapItem->getType()
- == static_cast<int>(MapItemType::HOME));
+ == CAST_S32(MapItemType::HOME));
const int x = static_cast<const int>(mMapItem->getX());
const int y = static_cast<const int>(mMapItem->getY());
specialLayer->setTile(x, y,
- static_cast<int>(MapItemType::EMPTY));
+ CAST_S32(MapItemType::EMPTY));
if (socialWindow)
socialWindow->removePortal(x, y);
if (isHome && localPlayer)
@@ -1493,7 +1493,7 @@ void PopupMenu::handleLink(const std::string &link,
replaceAll(cmd, "'FLOORID'", toString(toInt(mFloorItemId, int)));
replaceAll(cmd, "'ITEMID'", toString(mItemId));
replaceAll(cmd, "'ITEMCOLOR'", toString(toInt(mItemColor, int)));
- replaceAll(cmd, "'BEINGTYPEID'", toString(static_cast<int>(mType)));
+ replaceAll(cmd, "'BEINGTYPEID'", toString(CAST_S32(mType)));
replaceAll(cmd, "'PLAYER'", localPlayer->getName());
if (mItemIndex >= 0)
replaceAll(cmd, "'INVINDEX'", toString(mItemIndex));
@@ -2163,7 +2163,7 @@ void PopupMenu::showWindowsPopup()
continue;
mBrowserBox->addRow(strprintf("show window_%d",
- static_cast<int>(btn->key)),
+ CAST_S32(btn->key)),
btn->text.c_str());
}
mBrowserBox->addRow("##3---");