From f41c42368dd402b11af0b041e9593fee31d96319 Mon Sep 17 00:00:00 2001 From: w00t Date: Sat, 29 Mar 2008 16:03:26 +0000 Subject: 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 --- src/hashcomp.cpp | 4 ++-- 1 file 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 >::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; -- cgit v1.2.3