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/gui/widgets/itemlinkhandler.cpp | |
parent | f1518dd8476c968a43fa57cfb06198e290a4f77a (diff) | |
download | mv-36ba43d6ea38062b17f7e63ef659962bfc51c64d.tar.gz mv-36ba43d6ea38062b17f7e63ef659962bfc51c64d.tar.bz2 mv-36ba43d6ea38062b17f7e63ef659962bfc51c64d.tar.xz mv-36ba43d6ea38062b17f7e63ef659962bfc51c64d.zip |
Fix clang-tidy check readability-implicit-bool-cast.
Diffstat (limited to 'src/gui/widgets/itemlinkhandler.cpp')
-rw-r--r-- | src/gui/widgets/itemlinkhandler.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/gui/widgets/itemlinkhandler.cpp b/src/gui/widgets/itemlinkhandler.cpp index 90a26a4a0..295e41d16 100644 --- a/src/gui/widgets/itemlinkhandler.cpp +++ b/src/gui/widgets/itemlinkhandler.cpp @@ -95,7 +95,7 @@ void ItemLinkHandler::handleCommandLink(const std::string &link, void ItemLinkHandler::handleHelpLink(const std::string &link) { - if (helpWindow) + if (helpWindow != nullptr) { helpWindow->loadHelp(link.substr(7)); helpWindow->requestMoveToTop(); @@ -105,7 +105,7 @@ void ItemLinkHandler::handleHelpLink(const std::string &link) void ItemLinkHandler::handleHttpLink(const std::string &link, const MouseEvent *const event) { - if (!event) + if (event == nullptr) return; std::string url = link; replaceAll(url, " ", ""); @@ -124,14 +124,14 @@ void ItemLinkHandler::handleHttpLink(const std::string &link, } else if (button == MouseButton::RIGHT) { - if (popupMenu) + if (popupMenu != nullptr) popupMenu->showLinkPopup(url); } } void ItemLinkHandler::handleItemLink(const std::string &link) { - if (!itemPopup || link.empty()) + if ((itemPopup == nullptr) || link.empty()) return; const char ch = link[0]; @@ -160,7 +160,7 @@ void ItemLinkHandler::handleItemLink(const std::string &link) { itemPopup->setVisible(Visible_false); } - else if (viewport) + else if (viewport != nullptr) { itemPopup->position(viewport->mMouseX, viewport->mMouseY); @@ -170,7 +170,7 @@ void ItemLinkHandler::handleItemLink(const std::string &link) void ItemLinkHandler::handleSearchLink(const std::string &link) { - if (helpWindow) + if (helpWindow != nullptr) { helpWindow->search(link.substr(1)); helpWindow->requestMoveToTop(); @@ -205,7 +205,7 @@ void ItemLinkHandler::handleLink(const std::string &link, } else if (link == "news") { - if (helpWindow) + if (helpWindow != nullptr) helpWindow->loadHelpSimple("news"); } else if (link == "copyright") |