From 6bc3d71946b339a5a10ca621b029fe8a5b180d68 Mon Sep 17 00:00:00 2001 From: brain Date: Tue, 26 Dec 2006 12:41:10 +0000 Subject: 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 --- src/modules/m_blockcaps.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/modules') 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++; -- cgit v1.2.3