summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/popups/itempopup.cpp10
-rw-r--r--src/gui/windows/tradewindow.cpp9
-rw-r--r--src/gui/windows/tradewindow.h4
3 files changed, 15 insertions, 8 deletions
diff --git a/src/gui/popups/itempopup.cpp b/src/gui/popups/itempopup.cpp
index 99418881f..df245370c 100644
--- a/src/gui/popups/itempopup.cpp
+++ b/src/gui/popups/itempopup.cpp
@@ -117,13 +117,17 @@ void ItemPopup::setItem(const Item *const item, const bool showImage)
mLastId = item->getId();
if (serverVersion > 0)
{
- mItemName->setCaption(strprintf("%s (+%d), %d", ii.getName(
- item->getColor()).c_str(), item->getRefine(), ii.getId()));
+ mItemName->setCaption(strprintf("%s (+%u), %d",
+ ii.getName(item->getColor()).c_str(),
+ static_cast<unsigned int>(item->getRefine()),
+ ii.getId()));
}
else
{
mItemName->setCaption(strprintf("%s (+%d), %d",
- ii.getName().c_str(), item->getRefine(), ii.getId()));
+ ii.getName().c_str(),
+ static_cast<unsigned int>(item->getRefine()),
+ ii.getId()));
}
mItemName->adjustSize();
const unsigned minWidth = mItemName->getWidth() + 8;
diff --git a/src/gui/windows/tradewindow.cpp b/src/gui/windows/tradewindow.cpp
index 1fccb0c0b..21144b341 100644
--- a/src/gui/windows/tradewindow.cpp
+++ b/src/gui/windows/tradewindow.cpp
@@ -191,8 +191,11 @@ void TradeWindow::setMoney(const int amount)
mMoneyLabel->adjustSize();
}
-void TradeWindow::addItem(const int id, const bool own, const int quantity,
- const int refine, const unsigned char color) const
+void TradeWindow::addItem(const int id,
+ const bool own,
+ const int quantity,
+ const uint8_t refine,
+ const unsigned char color) const
{
if (own)
mMyInventory->addItem(id, quantity, refine, color);
@@ -201,7 +204,7 @@ void TradeWindow::addItem(const int id, const bool own, const int quantity,
}
void TradeWindow::addItem2(const int id, const bool own, const int quantity,
- const int refine, const unsigned char color,
+ const uint8_t refine, const unsigned char color,
const bool equipment) const
{
if (own)
diff --git a/src/gui/windows/tradewindow.h b/src/gui/windows/tradewindow.h
index 447e99144..0c01c81cd 100644
--- a/src/gui/windows/tradewindow.h
+++ b/src/gui/windows/tradewindow.h
@@ -68,7 +68,7 @@ class TradeWindow final : public Window,
* Add an item to the trade window.
*/
void addItem(const int id, const bool own, const int quantity,
- const int refine, const unsigned char color) const;
+ const uint8_t refine, const unsigned char color) const;
/**
* Reset both item containers
@@ -79,7 +79,7 @@ class TradeWindow final : public Window,
* Add an item to the trade window.
*/
void addItem2(const int id, const bool own, const int quantity,
- const int refine, const unsigned char color,
+ const uint8_t refine, const unsigned char color,
const bool equipment) const;
/**