summaryrefslogtreecommitdiff
path: root/src/gui/itempopup.cpp
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <bjorn@lindeijer.nl>2024-01-26 16:07:54 +0100
committerThorbjørn Lindeijer <bjorn@lindeijer.nl>2024-01-26 16:07:54 +0100
commit5afe88df2538274859a162ffd63ed52118e80c19 (patch)
treeb610dfd58dc748fd63f49565b2a43eea2316714f /src/gui/itempopup.cpp
parent73ba2a95f5bd4a0dd09af52d5864800be2b0a4c6 (diff)
downloadmana-5afe88df2538274859a162ffd63ed52118e80c19.tar.gz
mana-5afe88df2538274859a162ffd63ed52118e80c19.tar.bz2
mana-5afe88df2538274859a162ffd63ed52118e80c19.tar.xz
mana-5afe88df2538274859a162ffd63ed52118e80c19.zip
Apply C++11 fixits
modernize-use-auto modernize-use-nullptr modernize-use-override modernize-use-using
Diffstat (limited to 'src/gui/itempopup.cpp')
-rw-r--r--src/gui/itempopup.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gui/itempopup.cpp b/src/gui/itempopup.cpp
index c09a0504..f096e5ca 100644
--- a/src/gui/itempopup.cpp
+++ b/src/gui/itempopup.cpp
@@ -83,7 +83,7 @@ static gcn::Color getColorFromItemType(ItemType type)
ItemPopup::ItemPopup():
Popup("ItemPopup"),
- mIcon(0)
+ mIcon(nullptr)
{
// Item Name
mItemName = new Label;
@@ -102,7 +102,7 @@ ItemPopup::ItemPopup():
mItemWeight = new TextBox;
mItemWeight->setEditable(false);
- mIcon = new Icon(0);
+ mIcon = new Icon(nullptr);
add(mItemName);
add(mItemDesc);
@@ -130,7 +130,7 @@ void ItemPopup::setEquipmentText(const std::string& text)
void ItemPopup::setNoItem()
{
- mIcon->setImage(0);
+ mIcon->setImage(nullptr);
std::string caption = _("No item");
if (!mItemEquipSlot.empty())
@@ -180,7 +180,7 @@ void ItemPopup::setItem(const ItemInfo &item, bool showImage)
}
else
{
- mIcon->setImage(0);
+ mIcon->setImage(nullptr);
}
mItemType = item.getItemType();
@@ -198,7 +198,7 @@ void ItemPopup::setItem(const ItemInfo &item, bool showImage)
{
const std::vector<std::string> &effect = item.getEffect();
std::string temp = "";
- for (std::vector<std::string>::const_iterator it = effect.begin(),
+ for (auto it = effect.begin(),
it_end = effect.end(); it != it_end; ++it)
temp += temp.empty() ? *it : "\n" + *it;
mItemEffect->setTextWrapped(temp, ITEMPOPUP_WRAP_WIDTH);