diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-09-19 17:55:13 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-09-19 17:55:13 +0000 |
commit | 833cf31a6569efb3836e1b293bdaec1abb6fdd49 (patch) | |
tree | 98c94c467940ebafb126234c734ea16158c571a2 /src | |
parent | 34e8e5ff50213baad0ac81df8261a736d96e9b2d (diff) |
Adapt to use std::string::const_iterator
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5302 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r-- | src/hashcomp.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/hashcomp.cpp b/src/hashcomp.cpp index 7df7960f9..a1e097509 100644 --- a/src/hashcomp.cpp +++ b/src/hashcomp.cpp @@ -86,8 +86,8 @@ size_t nspace::hash<string>::operator()(const string &s) const * only with *x replaced with lowermap[*x]. * This avoids a copy to use hash<const char*> */ - unsigned long t = 0; - for (const char* x = s.c_str(); *x; ++x) /* ++x not x++, so we don't hash the \0 */ + register unsigned long t = 0; + for (std::string::const_iterator x = s.begin(); x != s.end(); x++) /* ++x not x++, so we don't hash the \0 */ t = 5 * t + lowermap[(unsigned char)*x]; return size_t(t); } |