1
0
mirror of https://github.com/anope/anope.git synced 2026-06-30 21:26:37 +02:00

Optimizations of much of the more commonly used code

This commit is contained in:
Adam
2013-04-07 23:46:44 -05:00
parent 36602224b8
commit fb7fef7a84
64 changed files with 772 additions and 806 deletions
+3 -3
View File
@@ -406,7 +406,7 @@ bool Anope::Match(const Anope::string &str, const Anope::string &mask, bool case
}
else
{
if (tolower(wild) != tolower(string) && wild != '?')
if (Anope::tolower(wild) != Anope::tolower(string) && wild != '?')
return false;
}
@@ -441,7 +441,7 @@ bool Anope::Match(const Anope::string &str, const Anope::string &mask, bool case
}
else
{
if (tolower(wild) == tolower(string) || wild == '?')
if (Anope::tolower(wild) == Anope::tolower(string) || wild == '?')
{
++m;
++s;
@@ -529,7 +529,7 @@ void Anope::Unhex(const Anope::string &src, Anope::string &dest)
Anope::string rv;
for (size_t i = 0; i + 1 < len; i += 2)
{
char h = std::tolower(src[i], Anope::casemap), l = std::tolower(src[i + 1], Anope::casemap);
char h = Anope::tolower(src[i]), l = Anope::tolower(src[i + 1]);
unsigned char byte = (h >= 'a' ? h - 'a' + 10 : h - '0') << 4;
byte += (l >= 'a' ? l - 'a' + 10 : l - '0');
rv += byte;