summaryrefslogtreecommitdiff
path: root/src/gui/windows
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/windows')
-rw-r--r--src/gui/windows/buydialog.cpp7
-rw-r--r--src/gui/windows/changeemaildialog.cpp2
-rw-r--r--src/gui/windows/changepassworddialog.cpp2
-rw-r--r--src/gui/windows/shopwindow.cpp2
4 files changed, 5 insertions, 8 deletions
diff --git a/src/gui/windows/buydialog.cpp b/src/gui/windows/buydialog.cpp
index 39255a632..b7e49ab3f 100644
--- a/src/gui/windows/buydialog.cpp
+++ b/src/gui/windows/buydialog.cpp
@@ -474,11 +474,8 @@ void BuyDialog::action(const gcn::ActionEvent &event)
{
Net::getBuySellHandler()->sendBuyRequest(mNick,
item, mAmountItems);
- if (tradeWindow)
- {
- tradeWindow->addAutoMoney(mNick,
- item->getPrice() * mAmountItems);
- }
+ tradeWindow->addAutoMoney(mNick,
+ item->getPrice() * mAmountItems);
}
}
}
diff --git a/src/gui/windows/changeemaildialog.cpp b/src/gui/windows/changeemaildialog.cpp
index 61ff7ef3d..a5c47e090 100644
--- a/src/gui/windows/changeemaildialog.cpp
+++ b/src/gui/windows/changeemaildialog.cpp
@@ -161,7 +161,7 @@ void ChangeEmailDialog::action(const gcn::ActionEvent &event)
{
if (error == 1)
mWrongDataNoticeListener->setTarget(this->mFirstEmailField);
- else if (error == 2)
+ else // if (error == 2)
mWrongDataNoticeListener->setTarget(this->mSecondEmailField);
// TRANSLATORS: change email error header
diff --git a/src/gui/windows/changepassworddialog.cpp b/src/gui/windows/changepassworddialog.cpp
index 365ee19a8..5d520e95f 100644
--- a/src/gui/windows/changepassworddialog.cpp
+++ b/src/gui/windows/changepassworddialog.cpp
@@ -151,7 +151,7 @@ void ChangePasswordDialog::action(const gcn::ActionEvent &event)
mWrongDataNoticeListener->setTarget(this->mOldPassField);
else if (error == 2)
mWrongDataNoticeListener->setTarget(this->mFirstPassField);
- else if (error == 3)
+ else // if (error == 3)
mWrongDataNoticeListener->setTarget(this->mSecondPassField);
// TRANSLATORS: change password error header
diff --git a/src/gui/windows/shopwindow.cpp b/src/gui/windows/shopwindow.cpp
index 082ebddb0..1c854c9fd 100644
--- a/src/gui/windows/shopwindow.cpp
+++ b/src/gui/windows/shopwindow.cpp
@@ -622,7 +622,7 @@ void ShopWindow::sendMessage(const std::string &nick,
if (config.getBoolValue("hideShopMessages"))
Net::getChatHandler()->privateMessage(nick, data);
- else if (chatWindow)
+ else
chatWindow->addWhisper(nick, data, BY_PLAYER);
}