summaryrefslogtreecommitdiff
path: root/src/gui/windows/quitdialog.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/quitdialog.cpp
parentf1518dd8476c968a43fa57cfb06198e290a4f77a (diff)
downloadmanaverse-36ba43d6ea38062b17f7e63ef659962bfc51c64d.tar.gz
manaverse-36ba43d6ea38062b17f7e63ef659962bfc51c64d.tar.bz2
manaverse-36ba43d6ea38062b17f7e63ef659962bfc51c64d.tar.xz
manaverse-36ba43d6ea38062b17f7e63ef659962bfc51c64d.zip
Fix clang-tidy check readability-implicit-bool-cast.
Diffstat (limited to 'src/gui/windows/quitdialog.cpp')
-rw-r--r--src/gui/windows/quitdialog.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gui/windows/quitdialog.cpp b/src/gui/windows/quitdialog.cpp
index 4a786d22a..e04b28d18 100644
--- a/src/gui/windows/quitdialog.cpp
+++ b/src/gui/windows/quitdialog.cpp
@@ -130,7 +130,7 @@ void QuitDialog::postInit()
QuitDialog::~QuitDialog()
{
- if (mMyPointer)
+ if (mMyPointer != nullptr)
*mMyPointer = nullptr;
delete2(mForceQuit);
delete2(mLogoutQuit);
@@ -150,10 +150,10 @@ void QuitDialog::action(const ActionEvent &event)
soundManager.playGuiSound(SOUND_HIDE_WINDOW);
if (event.getId() == "ok")
{
- if (viewport)
+ if (viewport != nullptr)
{
const Map *const map = viewport->getMap();
- if (map)
+ if (map != nullptr)
map->saveExtraLayer();
}
@@ -166,7 +166,7 @@ void QuitDialog::action(const ActionEvent &event)
DialogsManager::closeDialogs();
client->setState(State::EXIT);
}
- else if (mRate && mRate->isSelected())
+ else if ((mRate != nullptr) && mRate->isSelected())
{
openBrowser("https://play.google.com/store/apps/details?"
"id=org.evolonline.beta.manaplus");
@@ -241,7 +241,7 @@ void QuitDialog::keyPressed(KeyEvent &event)
if (it == mOptions.end())
{
- if (mOptions[0])
+ if (mOptions[0] != nullptr)
mOptions[0]->setSelected(true);
return;
}