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/npcdialog.cpp | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'src/gui/npcdialog.cpp') diff --git a/src/gui/npcdialog.cpp b/src/gui/npcdialog.cpp index b926d260e..66a30c8a7 100644 --- a/src/gui/npcdialog.cpp +++ b/src/gui/npcdialog.cpp @@ -55,14 +55,14 @@ NpcDialog::DialogList NpcDialog::instances; -NpcDialog::NpcDialog(int npcId) - : Window(_("NPC"), false, 0, "npc.xml"), - mNpcId(npcId), - mLogInteraction(config.getBoolValue("logNpcInGui")), - mDefaultInt(0), - mInputState(NPC_INPUT_NONE), - mActionState(NPC_ACTION_WAIT), - mLastNextTime(0) +NpcDialog::NpcDialog(int npcId) : + Window(_("NPC"), false, nullptr, "npc.xml"), + mNpcId(npcId), + mLogInteraction(config.getBoolValue("logNpcInGui")), + mDefaultInt(0), + mInputState(NPC_INPUT_NONE), + mActionState(NPC_ACTION_WAIT), + mLastNextTime(0) { // Basic Window Setup setWindowName("NpcText"); @@ -143,32 +143,32 @@ NpcDialog::~NpcDialog() clearLayout(); delete mTextBox; - mTextBox = 0; + mTextBox = nullptr; delete mClearButton; - mClearButton = 0; + mClearButton = nullptr; delete mButton; - mButton = 0; + mButton = nullptr; // These might not actually be in the layout, so lets be safe delete mScrollArea; - mScrollArea = 0; + mScrollArea = nullptr; delete mItemList; - mItemList = 0; + mItemList = nullptr; delete mTextField; - mTextField = 0; + mTextField = nullptr; delete mIntField; - mIntField = 0; + mIntField = nullptr; delete mResetButton; - mResetButton = 0; + mResetButton = nullptr; delete mPlusButton; - mPlusButton = 0; + mPlusButton = nullptr; delete mMinusButton; - mMinusButton = 0; + mMinusButton = nullptr; delete mItemLinkHandler; - mItemLinkHandler = 0; + mItemLinkHandler = nullptr; delete mListScrollArea; - mListScrollArea = 0; + mListScrollArea = nullptr; instances.remove(this); } @@ -432,7 +432,7 @@ NpcDialog *NpcDialog::getActive() return (*it); } - return 0; + return nullptr; } void NpcDialog::closeAll() -- cgit v1.2.3-70-g09d2