summaryrefslogtreecommitdiff
path: root/src/hashcomp.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-09-19 13:16:04 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-09-19 13:16:04 +0000
commit136b8e0f8c75f61e063f9c4f0acdf0c139d0f892 (patch)
tree613d40e9c23662657efb15539d23078dca50f0d9 /src/hashcomp.cpp
parent68af3d922102d2e9ff6ba2e5820544dfa3469394 (diff)
Use ++x not x++, to more closely match what stl does
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5299 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/hashcomp.cpp')
-rw-r--r--src/hashcomp.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/hashcomp.cpp b/src/hashcomp.cpp
index 168bcbe0f..7df7960f9 100644
--- a/src/hashcomp.cpp
+++ b/src/hashcomp.cpp
@@ -87,7 +87,7 @@ size_t nspace::hash<string>::operator()(const string &s) const
* This avoids a copy to use hash<const char*>
*/
unsigned long t = 0;
- for (const char* x = s.c_str(); *x; x++)
+ for (const char* x = s.c_str(); *x; ++x) /* ++x not x++, so we don't hash the \0 */
t = 5 * t + lowermap[(unsigned char)*x];
return size_t(t);
}