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/fs/virtfs/tools.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/fs/virtfs/tools.cpp') diff --git a/src/fs/virtfs/tools.cpp b/src/fs/virtfs/tools.cpp index a5bf06097..7850d056b 100644 --- a/src/fs/virtfs/tools.cpp +++ b/src/fs/virtfs/tools.cpp @@ -47,7 +47,7 @@ namespace VirtFs const size_t len = str.size(); if (len > ext.length() && - !ext.compare(str.substr(len - ext.length()))) + (ext.compare(str.substr(len - ext.length())) == 0)) { const std::string file = path + str; const std::string realPath = VirtFs::getRealDir(file); @@ -66,7 +66,7 @@ namespace VirtFs const std::string str = *i; const size_t len = str.size(); if (len > ext.length() && - !ext.compare(str.substr(len - ext.length()))) + (ext.compare(str.substr(len - ext.length())) == 0)) { const std::string file = path + str; const std::string realPath = VirtFs::getRealDir(file); @@ -122,7 +122,7 @@ namespace VirtFs int contentsLength; const char *fileContents = VirtFs::loadFile(fileName, contentsLength); - if (!fileContents) + if (fileContents == nullptr) { logger->log("Couldn't load text file: %s", fileName.c_str()); return std::string(); @@ -138,7 +138,7 @@ namespace VirtFs int contentsLength; const char *fileContents = VirtFs::loadFile(fileName, contentsLength); - if (!fileContents) + if (fileContents == nullptr) { logger->log("Couldn't load text file: %s", fileName.c_str()); return false; -- cgit v1.2.3-60-g2f50