diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-12-26 12:41:10 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-12-26 12:41:10 +0000 |
commit | 6bc3d71946b339a5a10ca621b029fe8a5b180d68 (patch) | |
tree | 990a1981dd816eedaeade7bbdd9c7b59a4a577e9 | |
parent | eedbc9c88e6cd4dfdc31a813e4826ff84a1ae4f5 (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
-rw-r--r-- | src/modules/m_blockcaps.cpp | 3 |
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++; |