1
0
mirror of https://github.com/anope/anope.git synced 2026-07-09 02:43:13 +02:00

Simplify several boolean expressions.

This commit is contained in:
Sadie Powell
2024-02-27 10:16:05 +00:00
parent 9f6d378755
commit 7640fad30c
27 changed files with 40 additions and 50 deletions
+2 -4
View File
@@ -26,9 +26,7 @@ public:
bool HasPriv(const Anope::string &priv) const override
{
std::map<Anope::string, char>::iterator it = defaultFlags.find(priv);
if (it != defaultFlags.end() && this->flags.count(it->second) > 0)
return true;
return false;
return it != defaultFlags.end() && this->flags.count(it->second) > 0;
}
Anope::string AccessSerialize() const override
@@ -324,7 +322,7 @@ class CommandCSFlags final
for (size_t j = 1; j < arg.length(); ++j)
if (flags.find(arg[j]) == Anope::string::npos)
pass = false;
if (pass == false)
if (!pass)
continue;
}
else if (!Anope::Match(access->Mask(), arg))