[Base] remove superfluous nullptr checks

This commit is contained in:
Uwe
2022-07-18 03:16:22 +02:00
parent e69a920f18
commit 4b2ffd2eca
9 changed files with 36 additions and 36 deletions

View File

@@ -619,12 +619,12 @@ std::vector<Base::FileInfo> FileInfo::getDirectoryContent() const
#elif defined (FC_OS_LINUX) || defined(FC_OS_CYGWIN) || defined(FC_OS_MACOSX) || defined(FC_OS_BSD)
DIR* dp(nullptr);
struct dirent* dentry(nullptr);
if ((dp = opendir(FileName.c_str())) == nullptr)
if (!(dp = opendir(FileName.c_str())))
{
return List;
}
while ((dentry = readdir(dp)) != nullptr)
while ((dentry = readdir(dp)))
{
std::string dir = dentry->d_name;
if (dir != "." && dir != "..")