summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-12-26 12:41:10 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-12-26 12:41:10 +0000
commit6bc3d71946b339a5a10ca621b029fe8a5b180d68 (patch)
tree990a1981dd816eedaeade7bbdd9c7b59a4a577e9 /src
parenteedbc9c88e6cd4dfdc31a813e4826ff84a1ae4f5 (diff)
Change to use std::string::iterator rather than making a copy of the pointer and using .c_str()
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6124 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/modules/m_blockcaps.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/modules/m_blockcaps.cpp b/src/modules/m_blockcaps.cpp
index be366411e..0d76c9c84 100644
--- a/src/modules/m_blockcaps.cpp
+++ b/src/modules/m_blockcaps.cpp
@@ -86,8 +86,7 @@ public:
if (c->IsModeSet('P'))
{
int caps = 0;
- const char* i = text.c_str();
- for (; *i; i++)
+ for (std::string::iterator i = text.begin(); i != text.end(); i++)
{
if ( (*i >= 'A') && (*i <= 'Z'))
caps++;