summaryrefslogtreecommitdiff
path: root/src/gui/windows/textcommandeditor.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/textcommandeditor.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/textcommandeditor.cpp')
-rw-r--r--src/gui/windows/textcommandeditor.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/gui/windows/textcommandeditor.cpp b/src/gui/windows/textcommandeditor.cpp
index 4adeacbc6..5c8ee1357 100644
--- a/src/gui/windows/textcommandeditor.cpp
+++ b/src/gui/windows/textcommandeditor.cpp
@@ -52,7 +52,7 @@ TextCommandEditor::TextCommandEditor(TextCommand *const command) :
Window(_("Command Editor"), Modal_false, nullptr, "commandeditor.xml"),
ActionListener(),
#ifdef TMWA_SUPPORT
- mIsMagicCommand(command ?
+ mIsMagicCommand(command != nullptr ?
(command->getCommandType() == TextCommandType::Magic) : false),
#endif // TMWA_SUPPORT
mCommand(command),
@@ -136,14 +136,14 @@ TextCommandEditor::TextCommandEditor(TextCommand *const command) :
mIconDropDown->setActionEventId("icon");
mIconDropDown->addActionListener(this);
- if (mCommand)
+ if (mCommand != nullptr)
mIconDropDown->setSelectedString(mCommand->getIcon());
mSaveButton->adjustSize();
mCancelButton->adjustSize();
mDeleteButton->adjustSize();
- if (command)
+ if (command != nullptr)
{
#ifdef TMWA_SUPPORT
if (command->getCommandType() == TextCommandType::Magic)
@@ -290,7 +290,7 @@ void TextCommandEditor::scheduleDelete()
void TextCommandEditor::save()
{
- if (!mCommand)
+ if (mCommand == nullptr)
return;
#ifdef TMWA_SUPPORT
if (mIsMagicCommand)
@@ -314,13 +314,13 @@ void TextCommandEditor::save()
mCommand->setSchoolLvl(mSchoolLvlField->getValue());
#endif // TMWA_SUPPORT
- if (spellManager)
+ if (spellManager != nullptr)
spellManager->save();
}
void TextCommandEditor::deleteCommand()
{
- if (!mCommand)
+ if (mCommand == nullptr)
return;
mCommand->setSymbol("");
mCommand->setCommand("");
@@ -335,6 +335,6 @@ void TextCommandEditor::deleteCommand()
mCommand->setSchoolLvl(0);
#endif // TMWA_SUPPORT
- if (spellManager)
+ if (spellManager != nullptr)
spellManager->save();
}