From 36ba43d6ea38062b17f7e63ef659962bfc51c64d Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 6 Jun 2017 23:34:34 +0300 Subject: Fix clang-tidy check readability-implicit-bool-cast. --- src/utils/browserboxtools.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/utils/browserboxtools.cpp') 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( 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( 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( 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( 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 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(); } } -- cgit v1.2.3-60-g2f50