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/textcommand.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/textcommand.cpp') diff --git a/src/textcommand.cpp b/src/textcommand.cpp index 5e2570f0f..8a5949613 100644 --- a/src/textcommand.cpp +++ b/src/textcommand.cpp @@ -110,7 +110,7 @@ TextCommand::TextCommand(const int id) : TextCommand::~TextCommand() { - if (mImage) + if (mImage != nullptr) { mImage->decRef(); mImage = nullptr; @@ -119,7 +119,7 @@ TextCommand::~TextCommand() void TextCommand::loadImage() { - if (mImage) + if (mImage != nullptr) { mImage->decRef(); mImage = nullptr; @@ -132,6 +132,6 @@ void TextCommand::loadImage() mImage = Loader::getImage(pathJoin(paths.getStringValue("itemIcons"), display.image)); - if (!mImage) + if (mImage == nullptr) mImage = Theme::getImageFromTheme("unknown-item.png"); } -- cgit v1.2.3-70-g09d2