From 9fe21fcd8883b37bdc30224822e6e42afb35b8f0 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 7 Feb 2016 16:18:13 +0300 Subject: Replace most static_cast to shorter versions from defines. --- src/gui/popups/popupmenu.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/gui/popups/popupmenu.cpp') 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(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(actor); mBrowserBox->addRow(strprintf("@@flooritem_%u|%s >@@", - static_cast(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(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(MapItemType::HOME)); + == CAST_S32(MapItemType::HOME)); const int x = static_cast(mMapItem->getX()); const int y = static_cast(mMapItem->getY()); specialLayer->setTile(x, y, - static_cast(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(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(btn->key)), + CAST_S32(btn->key)), btn->text.c_str()); } mBrowserBox->addRow("##3---"); -- cgit v1.2.3-70-g09d2