summaryrefslogtreecommitdiff
path: root/src/gui/windows/mailviewwindow.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-06-06 23:34:34 +0300
committerAndrei Karas <akaras@inbox.ru>2017-06-07 19:23:40 +0300
commit36ba43d6ea38062b17f7e63ef659962bfc51c64d (patch)
tree190156cb88b13a38a6d13c69ee0742cc078065a1 /src/gui/windows/mailviewwindow.cpp
parentf1518dd8476c968a43fa57cfb06198e290a4f77a (diff)
downloadmv-36ba43d6ea38062b17f7e63ef659962bfc51c64d.tar.gz
mv-36ba43d6ea38062b17f7e63ef659962bfc51c64d.tar.bz2
mv-36ba43d6ea38062b17f7e63ef659962bfc51c64d.tar.xz
mv-36ba43d6ea38062b17f7e63ef659962bfc51c64d.zip
Fix clang-tidy check readability-implicit-bool-cast.
Diffstat (limited to 'src/gui/windows/mailviewwindow.cpp')
-rw-r--r--src/gui/windows/mailviewwindow.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/gui/windows/mailviewwindow.cpp b/src/gui/windows/mailviewwindow.cpp
index 54c3edca7..19d1211bb 100644
--- a/src/gui/windows/mailviewwindow.cpp
+++ b/src/gui/windows/mailviewwindow.cpp
@@ -99,7 +99,7 @@ MailViewWindow::MailViewWindow(const MailMessage *const message) :
placer(0, n++, mTimeLabel);
placer(0, n++, mFromLabel);
placer(0, n++, mSubjectLabel);
- if (message->money)
+ if (message->money != 0)
{
// TRANSLATORS: mail view window label
mMoneyLabel = new Label(this, strprintf("%s %d", _("Money:"),
@@ -107,7 +107,7 @@ MailViewWindow::MailViewWindow(const MailMessage *const message) :
placer(0, n++, mMoneyLabel);
}
placer(0, n++, mMessageLabel);
- if (message->itemId)
+ if (message->itemId != 0)
{
const ItemInfo &item = ItemDB::get(message->itemId);
// +++ need use message->cards and ItemColorManager for colors
@@ -135,7 +135,7 @@ MailViewWindow::MailViewWindow(const MailMessage *const message) :
placer(0, n, mItemLabel);
placer(1, n++, mIcon);
}
- if (message->money || message->itemId)
+ if ((message->money != 0) || (message->itemId != 0))
{
mGetAttachButton = new Button(this,
// TRANSLATORS: mail view attach button
@@ -158,10 +158,10 @@ MailViewWindow::MailViewWindow(const MailMessage *const message) :
MailViewWindow::~MailViewWindow()
{
- if (mIcon)
+ if (mIcon != nullptr)
{
Image *const image = mIcon->getImage();
- if (image)
+ if (image != nullptr)
image->decRef();
}
delete2(mMessage);
@@ -177,24 +177,24 @@ void MailViewWindow::action(const ActionEvent &event)
}
else if (eventId == "attach")
{
- if (mGetAttachButton)
+ if (mGetAttachButton != nullptr)
mailHandler->getAttach(mMessage->id);
}
else if (eventId == "next")
{
- if (mMessage)
+ if (mMessage != nullptr)
mailWindow->viewNext(mMessage->id);
}
else if (eventId == "prev")
{
- if (mMessage)
+ if (mMessage != nullptr)
mailWindow->viewPrev(mMessage->id);
}
else if (eventId == "reply")
{
- if (!mMessage)
+ if (mMessage == nullptr)
return;
- if (mailEditWindow)
+ if (mailEditWindow != nullptr)
mailEditWindow->scheduleDelete();
CREATEWIDGETV0(mailEditWindow, MailEditWindow);
mailEditWindow->setTo(mMessage->sender);