From d68cd90e7c2237b0a90b84e9b01449843f4ea5b7 Mon Sep 17 00:00:00 2001 From: imaginos Date: Mon, 4 Apr 2005 06:35:19 +0000 Subject: [PATCH] fixed int32's that test against npos to string::size_type git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@105 726aef4b-f618-498e-8847-2d620e286838 --- modules/email.cpp | 5 ++++- modules/savebuff.cpp | 5 ++++- modules/schat.cpp | 5 ++++- modules/shell.cpp | 4 ++-- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/modules/email.cpp b/modules/email.cpp index 01fb2912..90782797 100644 --- a/modules/email.cpp +++ b/modules/email.cpp @@ -14,6 +14,9 @@ * Author: imaginos * * $Log$ + * Revision 1.2 2005/04/04 06:35:19 imaginos + * fixed int32's that test against npos to string::size_type + * * Revision 1.1 2005/03/30 18:46:35 imaginos * moving to standard makefile system, and cpp only extension * @@ -218,7 +221,7 @@ private: void CEmail::OnModCommand( const string& sCommand ) { - u_int iPos = sCommand.find( " " ); + string::size_type iPos = sCommand.find( " " ); string sCom, sArgs; if ( iPos == string::npos ) sCom = sCommand; diff --git a/modules/savebuff.cpp b/modules/savebuff.cpp index 245502fc..ecb023d9 100644 --- a/modules/savebuff.cpp +++ b/modules/savebuff.cpp @@ -25,6 +25,9 @@ * better solution then plain text. * * $Log$ + * Revision 1.2 2005/04/04 06:35:19 imaginos + * fixed int32's that test against npos to string::size_type + * * Revision 1.1 2005/03/30 19:36:20 imaginos * rename files * @@ -153,7 +156,7 @@ public: virtual void OnModCommand( const string& sCommand ) { - u_int iPos = sCommand.find( " " ); + string::size_type iPos = sCommand.find( " " ); string sCom, sArgs; if ( iPos == string::npos ) sCom = sCommand; diff --git a/modules/schat.cpp b/modules/schat.cpp index abb35790..f22351f9 100644 --- a/modules/schat.cpp +++ b/modules/schat.cpp @@ -14,6 +14,9 @@ * Author: imaginos * * $Log$ + * Revision 1.7 2005/04/04 06:35:19 imaginos + * fixed int32's that test against npos to string::size_type + * * Revision 1.6 2005/04/03 23:03:06 imaginos * show this requires ssl * @@ -212,7 +215,7 @@ public: } virtual void OnModCommand( const string& sCommand ) { - u_int iPos = sCommand.find( " " ); + string::size_type iPos = sCommand.find( " " ); string sCom, sArgs; if ( iPos == string::npos ) sCom = sCommand; diff --git a/modules/shell.cpp b/modules/shell.cpp index 5efa1bc5..349b4140 100644 --- a/modules/shell.cpp +++ b/modules/shell.cpp @@ -180,7 +180,7 @@ public: void PutShell(const string& sLine) { string sPath = m_sPath; - unsigned int a = sPath.find(' '); + string::size_type a = sPath.find(' '); while (a != string::npos) { sPath.replace(a, 1, "_"); a = sPath.find(' '); @@ -203,7 +203,7 @@ void CExecSock::ReadLine(const string& sData) { sLine = sLine.substr(0, sLine.length() -1); } - unsigned int a = sLine.find('\t'); + string::size_type a = sLine.find('\t'); while (a != string::npos) { sLine.replace(a, 1, " "); a = sLine.find('\t');