diff options
author | Naram Qashat <cyberbotx@cyberbotx.com> | 2010-06-24 00:34:04 -0400 |
---|---|---|
committer | Naram Qashat <cyberbotx@cyberbotx.com> | 2010-06-24 00:34:04 -0400 |
commit | 7bb90e1922b79d276f866625ecefdcaf5c6e9b08 (patch) | |
tree | f6730cce19f0b5ea84cd3b1eee053b9f43aab75c /src/hashcomp.cpp | |
parent | c4233e9f9a6b4804bd05f739fb3d0a09ec48e973 (diff) |
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.
Diffstat (limited to 'src/hashcomp.cpp')
-rw-r--r-- | src/hashcomp.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/hashcomp.cpp b/src/hashcomp.cpp index 3afef7b46..f8a03c5f8 100644 --- a/src/hashcomp.cpp +++ b/src/hashcomp.cpp @@ -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; |