summaryrefslogtreecommitdiff
path: root/src/gui/windows/logindialog.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/logindialog.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/logindialog.cpp')
-rw-r--r--src/gui/windows/logindialog.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/gui/windows/logindialog.cpp b/src/gui/windows/logindialog.cpp
index 731db0cc9..746d37878 100644
--- a/src/gui/windows/logindialog.cpp
+++ b/src/gui/windows/logindialog.cpp
@@ -85,7 +85,8 @@ LoginDialog::LoginDialog(LoginData &data,
mRegisterButton(new Button(this, _("Register"), "register", this)),
// TRANSLATORS: login dialog checkbox
mCustomUpdateHost(new CheckBox(this, _("Custom update host"),
- mLoginData->updateType & UpdateType::Custom, this, "customhost")),
+ (mLoginData->updateType & UpdateType::Custom) != 0,
+ this, "customhost")),
mUpdateHostText(new TextField(this, serverConfig.getValue(
"customUpdateHost", ""))),
mUpdateListModel(nullptr),
@@ -96,7 +97,7 @@ LoginDialog::LoginDialog(LoginData &data,
setCloseButton(true);
setWindowName("Login");
- if (charServerHandler)
+ if (charServerHandler != nullptr)
charServerHandler->clear();
mergeUpdateHosts();
@@ -155,7 +156,7 @@ LoginDialog::LoginDialog(LoginData &data,
place(0, 6, mUpdateTypeLabel, 1);
place(1, 6, mUpdateTypeDropDown, 8);
int n = 7;
- if (mUpdateHostDropDown)
+ if (mUpdateHostDropDown != nullptr)
{
place(0, 7, mUpdateHostDropDown, 9);
n += 1;
@@ -176,7 +177,7 @@ void LoginDialog::postInit()
setVisible(Visible_true);
const int h = 200;
- if (mUpdateHostDropDown)
+ if (mUpdateHostDropDown != nullptr)
setContentSize(310, 250);
setContentSize(310, h);
#ifdef ANDROID
@@ -196,7 +197,7 @@ void LoginDialog::postInit()
mPassField->requestFocus();
mLoginButton->setEnabled(canSubmit());
- if (loginHandler)
+ if (loginHandler != nullptr)
{
mRegisterButton->setEnabled(loginHandler->isRegistrationEnabled()
|| !mLoginData->registerUrl.empty());
@@ -209,9 +210,9 @@ void LoginDialog::postInit()
LoginDialog::~LoginDialog()
{
- if (mUpdateTypeDropDown)
+ if (mUpdateTypeDropDown != nullptr)
mUpdateTypeDropDown->hideDrop(false);
- if (mUpdateHostDropDown)
+ if (mUpdateHostDropDown != nullptr)
mUpdateHostDropDown->hideDrop(false);
delete2(mUpdateTypeModel);
@@ -329,7 +330,7 @@ void LoginDialog::prepareUpdate()
else
{
std::string str;
- if (mUpdateHostDropDown)
+ if (mUpdateHostDropDown != nullptr)
{
const int sel = mUpdateHostDropDown->getSelected();
if (sel >= 0)