1
0
mirror of https://github.com/anope/anope.git synced 2026-06-26 10:16:40 +02:00

The next of a few "CBX OCDing over code style" commits, focusing on src/core/enc_*, plus fixing unintentional broken logic in said modules caused by my first OCD commit.

Also added a note to example.conf about enc_sha1 being potentially broken, and slight code style OCD in hashcomp.cpp found by Adam.
This commit is contained in:
Naram Qashat
2010-06-24 00:34:04 -04:00
parent c4233e9f9a
commit 7bb90e1922
7 changed files with 541 additions and 612 deletions
+3 -3
View File
@@ -171,7 +171,7 @@ size_t hash_compare_std_string::operator()(const std::string &s) const
{
register size_t t = 0;
for (std::string::const_iterator it = s.begin(); it != s.end(); ++it)
for (std::string::const_iterator it = s.begin(), it_end = s.end(); it != it_end; ++it)
t = 5 * t + static_cast<const unsigned char>(*it);
return t;
@@ -185,7 +185,7 @@ size_t hash_compare_ci_string::operator()(const ci::string &s) const
{
register size_t t = 0;
for (ci::string::const_iterator it = s.begin(); it != s.end(); ++it)
for (ci::string::const_iterator it = s.begin(), it_end = s.end(); it != it_end; ++it)
t = 5 * t + ascii_case_insensitive_map[static_cast<const unsigned char>(*it)];
return t;
@@ -199,7 +199,7 @@ size_t hash_compare_irc_string::operator()(const irc::string &s) const
{
register size_t t = 0;
for (irc::string::const_iterator it = s.begin(); it != s.end(); ++it)
for (irc::string::const_iterator it = s.begin(), it_end = s.end(); it != it_end; ++it)
t = 5 * t + rfc_case_insensitive_map[static_cast<const unsigned char>(*it)];
return t;