summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-03-29 16:03:26 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-03-29 16:03:26 +0000
commitf41c42368dd402b11af0b041e9593fee31d96319 (patch)
treeb10f5af1c507ad800c123fa5af5a73817884b00b
parentfe7aa4267324f23d3fbd6c7adb642927896b3305 (diff)
Cast this to const unsigned char, not just unsigned char. We don't/can't modify them, and this avoids a warning on some compilers.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9205 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/hashcomp.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/hashcomp.cpp b/src/hashcomp.cpp
index ebd03fed2..a27a83f64 100644
--- a/src/hashcomp.cpp
+++ b/src/hashcomp.cpp
@@ -99,8 +99,8 @@ size_t nspace::hash_compare<irc::string, std::less<irc::string> >::operator()(co
bool irc::StrHashComp::operator()(const std::string& s1, const std::string& s2) const
{
- unsigned char* n1 = (unsigned char*)s1.c_str();
- unsigned char* n2 = (unsigned char*)s2.c_str();
+ const unsigned char* n1 = (const unsigned char*)s1.c_str();
+ const unsigned char* n2 = (const unsigned char*)s2.c_str();
for (; *n1 && *n2; n1++, n2++)
if (lowermap[*n1] != lowermap[*n2])
return false;