From 98dabed4de60bc86522632379f2499aecbae2b70 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 21 Jan 2012 01:26:07 +0300 Subject: Fix compilation errors and warnings for another gcc 4.7 snapshot. --- src/gui/equipmentwindow.cpp | 2 +- src/gui/equipmentwindow.h | 2 +- src/gui/inventorywindow.cpp | 2 +- src/gui/inventorywindow.h | 2 +- src/gui/ministatuswindow.cpp | 2 +- src/gui/socialwindow.cpp | 4 ++-- src/gui/textdialog.h | 2 +- src/gui/widgets/dropdown.h | 2 +- src/gui/widgets/playerbox.h | 4 +++- src/gui/widgets/progressindicator.cpp | 4 ++-- 10 files changed, 14 insertions(+), 12 deletions(-) (limited to 'src/gui') diff --git a/src/gui/equipmentwindow.cpp b/src/gui/equipmentwindow.cpp index 0dadca2dc..275bf19bb 100644 --- a/src/gui/equipmentwindow.cpp +++ b/src/gui/equipmentwindow.cpp @@ -65,7 +65,7 @@ EquipmentWindow::EquipmentWindow(Equipment *equipment, Being *being, mEquipment(equipment), mSelected(-1), mForing(foring), - mImageSet(0) + mImageSet(nullptr) { mBeing = being; mItemPopup = new ItemPopup; diff --git a/src/gui/equipmentwindow.h b/src/gui/equipmentwindow.h index c8cf095f8..daeaeb3d7 100644 --- a/src/gui/equipmentwindow.h +++ b/src/gui/equipmentwindow.h @@ -85,7 +85,7 @@ class EquipmentWindow : public Window, public gcn::ActionListener void mousePressed(gcn::MouseEvent& mouseEvent); Item* getEquipment(int i) - { return mEquipment ? mEquipment->getEquipment(i) : 0; } + { return mEquipment ? mEquipment->getEquipment(i) : nullptr; } void setBeing(Being *being); diff --git a/src/gui/inventorywindow.cpp b/src/gui/inventorywindow.cpp index f1ea1ff6e..01e2bdd17 100644 --- a/src/gui/inventorywindow.cpp +++ b/src/gui/inventorywindow.cpp @@ -98,7 +98,7 @@ InventoryWindow::WindowList InventoryWindow::instances; InventoryWindow::InventoryWindow(Inventory *inventory): Window("Inventory", false, nullptr, "inventory.xml"), mInventory(inventory), - mDropButton(0), + mDropButton(nullptr), mSplit(false), mCompactMode(false) { diff --git a/src/gui/inventorywindow.h b/src/gui/inventorywindow.h index 5f2c9cb0a..2b35ec9c4 100644 --- a/src/gui/inventorywindow.h +++ b/src/gui/inventorywindow.h @@ -128,7 +128,7 @@ class InventoryWindow : public Window, void processEvent(Mana::Channels channel, const Mana::Event &event); - void updateButtons(Item *item = 0); + void updateButtons(Item *item = nullptr); bool isInputFocused() const; diff --git a/src/gui/ministatuswindow.cpp b/src/gui/ministatuswindow.cpp index 3ab946fa8..00df97813 100644 --- a/src/gui/ministatuswindow.cpp +++ b/src/gui/ministatuswindow.cpp @@ -188,7 +188,7 @@ void MiniStatusWindow::updateBars() void MiniStatusWindow::setIcon(int index, AnimatedSprite *sprite) { if (index >= static_cast(mIcons.size())) - mIcons.resize(index + 1, 0); + mIcons.resize(index + 1, nullptr); delete mIcons[index]; diff --git a/src/gui/socialwindow.cpp b/src/gui/socialwindow.cpp index 4649c23a7..3988c819c 100644 --- a/src/gui/socialwindow.cpp +++ b/src/gui/socialwindow.cpp @@ -1115,11 +1115,11 @@ public: getPlayersAvatars(); } - void updateAvatar(std::string name) + void updateAvatar(std::string name A_UNUSED) { } - void resetDamage(std::string name) + void resetDamage(std::string name A_UNUSED) { } diff --git a/src/gui/textdialog.h b/src/gui/textdialog.h index f5395a17d..03deae8f6 100644 --- a/src/gui/textdialog.h +++ b/src/gui/textdialog.h @@ -44,7 +44,7 @@ public: * @see Window::Window */ TextDialog(const std::string &title, const std::string &msg, - Window *parent = 0, bool isPassword = false); + Window *parent = nullptr, bool isPassword = false); ~TextDialog(); diff --git a/src/gui/widgets/dropdown.h b/src/gui/widgets/dropdown.h index e9b61aa43..a769678ca 100644 --- a/src/gui/widgets/dropdown.h +++ b/src/gui/widgets/dropdown.h @@ -48,7 +48,7 @@ class DropDown : public gcn::DropDown * @param listBox the listBox to use. * @see ListModel, ScrollArea, ListBox. */ - DropDown(gcn::ListModel *listModel = 0, + DropDown(gcn::ListModel *listModel = nullptr, gcn::ActionListener* listener = nullptr, std::string eventId = ""); diff --git a/src/gui/widgets/playerbox.h b/src/gui/widgets/playerbox.h index a066c104e..d2393ca08 100644 --- a/src/gui/widgets/playerbox.h +++ b/src/gui/widgets/playerbox.h @@ -25,6 +25,8 @@ #include +#include "localconsts.h" + class Being; class ImageRect; @@ -40,7 +42,7 @@ class PlayerBox : public gcn::ScrollArea * Constructor. Takes the initial player character that this box should * display, which defaults to NULL. */ - PlayerBox(const Being *being = 0); + PlayerBox(const Being *being = nullptr); /** * Destructor. diff --git a/src/gui/widgets/progressindicator.cpp b/src/gui/widgets/progressindicator.cpp index ae94f0a0f..6adb5a2fa 100644 --- a/src/gui/widgets/progressindicator.cpp +++ b/src/gui/widgets/progressindicator.cpp @@ -51,7 +51,7 @@ ProgressIndicator::ProgressIndicator() } else { - mIndicator = 0; + mIndicator = nullptr; } setSize(32, 32); @@ -60,7 +60,7 @@ ProgressIndicator::ProgressIndicator() ProgressIndicator::~ProgressIndicator() { delete mIndicator; - mIndicator = 0; + mIndicator = nullptr; } void ProgressIndicator::logic() -- cgit v1.2.3-70-g09d2