diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-06-06 23:34:34 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-06-07 19:23:40 +0300 |
commit | 36ba43d6ea38062b17f7e63ef659962bfc51c64d (patch) | |
tree | 190156cb88b13a38a6d13c69ee0742cc078065a1 /src/utils/browserboxtools.cpp | |
parent | f1518dd8476c968a43fa57cfb06198e290a4f77a (diff) | |
download | manaplus-36ba43d6ea38062b17f7e63ef659962bfc51c64d.tar.gz manaplus-36ba43d6ea38062b17f7e63ef659962bfc51c64d.tar.bz2 manaplus-36ba43d6ea38062b17f7e63ef659962bfc51c64d.tar.xz manaplus-36ba43d6ea38062b17f7e63ef659962bfc51c64d.zip |
Fix clang-tidy check readability-implicit-bool-cast.
Diffstat (limited to 'src/utils/browserboxtools.cpp')
-rw-r--r-- | src/utils/browserboxtools.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/utils/browserboxtools.cpp b/src/utils/browserboxtools.cpp index 8a1fb42bb..5c7571c97 100644 --- a/src/utils/browserboxtools.cpp +++ b/src/utils/browserboxtools.cpp @@ -80,7 +80,7 @@ std::string BrowserBoxTools::replaceLinkCommands(const std::string &link) const BeingTypeId id = static_cast<BeingTypeId>( atoi(link.substr(1).c_str())); BeingInfo *info = MonsterDB::get(id); - if (info) + if (info != nullptr) data = info->getName(); } else if (!link.empty() && link[0] == 'p') @@ -88,7 +88,7 @@ std::string BrowserBoxTools::replaceLinkCommands(const std::string &link) const BeingTypeId id = static_cast<BeingTypeId>( atoi(link.substr(1).c_str())); BeingInfo *info = PETDB::get(id); - if (info) + if (info != nullptr) data = info->getName(); } else if (!link.empty() && link[0] == 'h') @@ -96,7 +96,7 @@ std::string BrowserBoxTools::replaceLinkCommands(const std::string &link) const BeingTypeId id = static_cast<BeingTypeId>( atoi(link.substr(1).c_str())); BeingInfo *info = HomunculusDB::get(id); - if (info) + if (info != nullptr) data = info->getName(); } else if (!link.empty() && link[0] == 'M') @@ -104,7 +104,7 @@ std::string BrowserBoxTools::replaceLinkCommands(const std::string &link) const BeingTypeId id = static_cast<BeingTypeId>( atoi(link.substr(1).c_str())); BeingInfo *info = MercenaryDB::get(id); - if (info) + if (info != nullptr) data = info->getName(); } else if (!link.empty() && link[0] == 'q') @@ -118,7 +118,7 @@ std::string BrowserBoxTools::replaceLinkCommands(const std::string &link) if (idx != std::string::npos) { const int id = atoi(link.substr(0, idx).c_str()); - if (id) + if (id != 0) { std::vector<int> parts; splitToIntVector(parts, @@ -133,7 +133,7 @@ std::string BrowserBoxTools::replaceLinkCommands(const std::string &link) else { const int id = atoi(link.c_str()); - if (id) + if (id != 0) data = ItemDB::get(id).getName(); } } |