1
0
mirror of https://github.com/anope/anope.git synced 2026-06-28 02:36:38 +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 -2
View File
@@ -57,7 +57,7 @@ public:
Anope::string Sanitize(const Anope::string &string) override
{
Anope::string ret = string;
for (int i = 0; special[i].character.empty() == false; ++i)
for (int i = 0; !special[i].character.empty(); ++i)
ret = ret.replace_all_cs(special[i].character, special[i].replace);
return ret;
}
@@ -65,7 +65,7 @@ public:
static Anope::string Unescape(const Anope::string &string)
{
Anope::string ret = string;
for (int i = 0; special[i].character.empty() == false; ++i)
for (int i = 0; !special[i].character.empty(); ++i)
if (!special[i].replace.empty())
ret = ret.replace_all_cs(special[i].replace, special[i].character);