summaryrefslogtreecommitdiff
path: root/src/fs/virtfs/fsdir.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-06-06 23:34:34 +0300
committerAndrei Karas <akaras@inbox.ru>2017-06-07 19:23:40 +0300
commit36ba43d6ea38062b17f7e63ef659962bfc51c64d (patch)
tree190156cb88b13a38a6d13c69ee0742cc078065a1 /src/fs/virtfs/fsdir.cpp
parentf1518dd8476c968a43fa57cfb06198e290a4f77a (diff)
downloadplus-36ba43d6ea38062b17f7e63ef659962bfc51c64d.tar.gz
plus-36ba43d6ea38062b17f7e63ef659962bfc51c64d.tar.bz2
plus-36ba43d6ea38062b17f7e63ef659962bfc51c64d.tar.xz
plus-36ba43d6ea38062b17f7e63ef659962bfc51c64d.zip
Fix clang-tidy check readability-implicit-bool-cast.
Diffstat (limited to 'src/fs/virtfs/fsdir.cpp')
-rw-r--r--src/fs/virtfs/fsdir.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/fs/virtfs/fsdir.cpp b/src/fs/virtfs/fsdir.cpp
index c3b0d3c66..bc73771e7 100644
--- a/src/fs/virtfs/fsdir.cpp
+++ b/src/fs/virtfs/fsdir.cpp
@@ -198,9 +198,9 @@ namespace FsDir
dirName;
const struct dirent *next_file = nullptr;
DIR *const dir = opendir(path.c_str());
- if (dir)
+ if (dir != nullptr)
{
- while ((next_file = readdir(dir)))
+ while ((next_file = readdir(dir)) != nullptr)
{
const std::string file = next_file->d_name;
if (file == "." || file == "..")
@@ -457,7 +457,7 @@ namespace FsDir
}
const int64_t len = static_cast<int64_t>(statbuf.st_size);
#endif // USE_FILE_FOPEN
- return pos < 0 || len < 0 || pos >= len;
+ return static_cast<int>(pos < 0 || len < 0 || pos >= len);
}
const char *loadFile(FsEntry *restrict const entry,
@@ -531,9 +531,9 @@ namespace FsDir
dirName;
const struct dirent *next_file = nullptr;
DIR *const dir = opendir(path.c_str());
- if (dir)
+ if (dir != nullptr)
{
- while ((next_file = readdir(dir)))
+ while ((next_file = readdir(dir)) != nullptr)
{
struct stat statbuf;
const std::string file = next_file->d_name;
@@ -581,9 +581,9 @@ namespace FsDir
dirName;
const struct dirent *next_file = nullptr;
DIR *const dir = opendir(path.c_str());
- if (dir)
+ if (dir != nullptr)
{
- while ((next_file = readdir(dir)))
+ while ((next_file = readdir(dir)) != nullptr)
{
struct stat statbuf;
const std::string file = next_file->d_name;
@@ -631,9 +631,9 @@ namespace FsDir
dirName;
const struct dirent *next_file = nullptr;
DIR *const dir = opendir(path.c_str());
- if (dir)
+ if (dir != nullptr)
{
- while ((next_file = readdir(dir)))
+ while ((next_file = readdir(dir)) != nullptr)
{
struct stat statbuf;
const std::string file = next_file->d_name;