Zandronum Chat @ irc.zandronum.com
#zandronum
Get the latest version: 3.0
Source Code

View Revisions: Issue #3818 All Revisions ] Back to Issue ]
Summary 0003818: Boolean expressions involving boolean constants (instead of expressing the boolean expression directly)
Revision 2020-06-07 07:19 by WubTheCaptain
Steps To Reproduce These are difficult to find with a text search and due to rarity, so I'll just point out one.
src/core/tests/testdatapaths.cpp:       } while (bEntryDoesExist == true);

Fortunately (or unfortunately), that's also part of the code that has rotten un(der)utilized.
Maybe this:
Quote from src/core/fileutils.cpp
bool FileUtils::containsPath(const QStringList &candidates, const QString &path)
{
        for (const QString &candidate : candidates)
        {
                if (QFileInfo(candidate) == QFileInfo(path))
                        return true;
        }
        return false;
}

Few more that I could find with grep -B 2 -A 2 -r 'return false' src/ | less.
Revision 2020-06-07 07:18 by WubTheCaptain
Steps To Reproduce These are difficult to find with a text search and due to rarity, so I'll just point out one.
src/core/tests/testdatapaths.cpp:       } while (bEntryDoesExist == true);

Fortunately (or unfortunately), that's also part of the code that has rotten un(der)utilized.
Maybe this:
Quote from src/core/fileutils.cpp
bool FileUtils::containsPath(const QStringList &candidates, const QString &path)
{
        for (const QString &candidate : candidates)
        {
                if (QFileInfo(candidate) == QFileInfo(path))
                        return true;
        }
        return false;
}

Few more that I could find with grep -B 2 -A 2 -r 'return false' src/ | less.






Questions or other issues? Contact Us.

Links


Copyright © 2000 - 2020 MantisBT Team
Powered by Mantis Bugtracker