summaryrefslogtreecommitdiff
path: root/src/net/tmwa/buysellhandler.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/net/tmwa/buysellhandler.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/net/tmwa/buysellhandler.cpp')
-rw-r--r--src/net/tmwa/buysellhandler.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/net/tmwa/buysellhandler.cpp b/src/net/tmwa/buysellhandler.cpp
index 232d9492e..7f48fb89c 100644
--- a/src/net/tmwa/buysellhandler.cpp
+++ b/src/net/tmwa/buysellhandler.cpp
@@ -49,7 +49,7 @@ BuySellHandler::BuySellHandler() :
void BuySellHandler::requestSellList(const std::string &nick) const
{
- if (nick.empty() != 0 || !shopWindow)
+ if (nick.empty() || shopWindow == nullptr)
return;
const std::string data("!selllist " + toString(tick_time));
@@ -60,14 +60,14 @@ void BuySellHandler::requestSellList(const std::string &nick) const
}
else
{
- if (chatWindow)
+ if (chatWindow != nullptr)
chatWindow->addWhisper(nick, data, ChatMsgType::BY_PLAYER);
}
}
void BuySellHandler::requestBuyList(const std::string &nick) const
{
- if (nick.empty() || !shopWindow)
+ if (nick.empty() || (shopWindow == nullptr))
return;
const std::string data("!buylist " + toString(tick_time));
@@ -79,7 +79,7 @@ void BuySellHandler::requestBuyList(const std::string &nick) const
}
else
{
- if (chatWindow)
+ if (chatWindow != nullptr)
chatWindow->addWhisper(nick, data, ChatMsgType::BY_PLAYER);
}
}
@@ -88,7 +88,7 @@ void BuySellHandler::sendBuyRequest(const std::string &nick,
const ShopItem *const item,
const int amount) const
{
- if (!chatWindow || nick.empty() || !item ||
+ if ((chatWindow == nullptr) || nick.empty() || (item == nullptr) ||
amount < 1 || amount > item->getQuantity())
{
return;
@@ -106,7 +106,7 @@ void BuySellHandler::sendSellRequest(const std::string &nick,
const ShopItem *const item,
const int amount) const
{
- if (!chatWindow || nick.empty() || !item ||
+ if ((chatWindow == nullptr) || nick.empty() || (item == nullptr) ||
amount < 1 || amount > item->getQuantity())
{
return;