From 9e83411f7e4147d09af5a5006888dcc187ea0ef8 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 7 Nov 2011 19:34:52 +0300 Subject: Fix some warnings under gcc 4.7. --- src/gui/equipmentwindow.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/gui/equipmentwindow.cpp') diff --git a/src/gui/equipmentwindow.cpp b/src/gui/equipmentwindow.cpp index f423cddf0..d3d230922 100644 --- a/src/gui/equipmentwindow.cpp +++ b/src/gui/equipmentwindow.cpp @@ -58,7 +58,7 @@ static const int BOX_HEIGHT = 36; EquipmentWindow::EquipmentWindow(Equipment *equipment, Being *being, bool foring): - Window(_("Equipment"), false, 0, "equipment.xml"), + Window(_("Equipment"), false, nullptr, "equipment.xml"), mEquipment(equipment), mSelected(-1), mForing(foring) @@ -86,7 +86,7 @@ EquipmentWindow::EquipmentWindow(Equipment *equipment, Being *being, mBoxes.reserve(13); for (int f = 0; f < 13; f ++) - mBoxes.push_back(0); + mBoxes.push_back(nullptr); fillBoxes(); @@ -109,13 +109,13 @@ EquipmentWindow::EquipmentWindow(Equipment *equipment, Being *being, EquipmentWindow::~EquipmentWindow() { delete mItemPopup; - mItemPopup = 0; + mItemPopup = nullptr; if (this == beingEquipmentWindow) { if (mEquipment) delete mEquipment->getBackend(); delete mEquipment; - mEquipment = 0; + mEquipment = nullptr; } delete_all(mBoxes); mBoxes.clear(); @@ -198,7 +198,7 @@ void EquipmentWindow::action(const gcn::ActionEvent &event) Item *EquipmentWindow::getItem(int x, int y) const { if (!mEquipment) - return 0; + return nullptr; std::vector*>::const_iterator it; std::vector*>::const_iterator it_end = mBoxes.end(); @@ -215,7 +215,7 @@ Item *EquipmentWindow::getItem(int x, int y) const if (tRect.isPointInRect(x, y)) return mEquipment->getEquipment(i); } - return NULL; + return nullptr; } void EquipmentWindow::mousePressed(gcn::MouseEvent& mouseEvent) @@ -322,7 +322,7 @@ void EquipmentWindow::setBeing(Being *being) delete mEquipment; if (!being) { - mEquipment = 0; + mEquipment = nullptr; return; } mEquipment = being->getEquipment(); @@ -337,7 +337,7 @@ void EquipmentWindow::updateBeing(Being *being) void EquipmentWindow::resetBeing(Being *being) { if (being == mBeing) - setBeing(0); + setBeing(nullptr); } void EquipmentWindow::fillBoxes() -- cgit v1.2.3-70-g09d2