diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-11-07 19:34:52 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-11-07 19:34:52 +0300 |
commit | 9e83411f7e4147d09af5a5006888dcc187ea0ef8 (patch) | |
tree | c084bdf8afabc6220779645dcb5dbf71af6a151f /src/gui/equipmentwindow.cpp | |
parent | bc7d91cc0c9c0f6dcad01d612932c6899afb5514 (diff) | |
download | plus-9e83411f7e4147d09af5a5006888dcc187ea0ef8.tar.gz plus-9e83411f7e4147d09af5a5006888dcc187ea0ef8.tar.bz2 plus-9e83411f7e4147d09af5a5006888dcc187ea0ef8.tar.xz plus-9e83411f7e4147d09af5a5006888dcc187ea0ef8.zip |
Fix some warnings under gcc 4.7.
Diffstat (limited to 'src/gui/equipmentwindow.cpp')
-rw-r--r-- | src/gui/equipmentwindow.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
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<std::pair<int, int>*>::const_iterator it; std::vector<std::pair<int, int>*>::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() |