From 022854c3b270929a82b5a42aa51bfb9486d2e4a5 Mon Sep 17 00:00:00 2001 From: prozacx Date: Mon, 4 Apr 2005 06:36:17 +0000 Subject: [PATCH] Changed to string::size_type for calls to string::find() git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@106 726aef4b-f618-498e-8847-2d620e286838 --- Nick.cpp | 2 +- Utils.cpp | 6 +++--- znc.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Nick.cpp b/Nick.cpp index d29cae7d..5caeaf68 100644 --- a/Nick.cpp +++ b/Nick.cpp @@ -18,7 +18,7 @@ void CNick::Parse(const string& sNickMask) { return; } - unsigned int uPos = sNickMask.find('!'); + string::size_type uPos = sNickMask.find('!'); if (uPos == string::npos) { m_sNick = sNickMask.substr((sNickMask[0] == ':')); diff --git a/Utils.cpp b/Utils.cpp index baa7d622..c3982598 100644 --- a/Utils.cpp +++ b/Utils.cpp @@ -505,7 +505,7 @@ CFile::CFile(const string& sLongName) { CUtils::LeftChomp(m_sShortName); } - unsigned int uPos = m_sShortName.rfind('/'); + string::size_type uPos = m_sShortName.rfind('/'); if (uPos != string::npos) { m_sShortName = m_sShortName.substr(uPos +1); } @@ -685,7 +685,7 @@ bool CFile::ReadLine(string & sData) { bool bEOF = false; while(true) { - u_int iFind = m_sBuffer.find("\n"); + string::size_type iFind = m_sBuffer.find("\n"); if (iFind != string::npos) { sData = m_sBuffer.substr(0, (iFind + 1)); m_sBuffer.erase(0, (iFind + 1)); @@ -714,7 +714,7 @@ bool CFile::ReadLine(string & sData) { } } - u_int iFind = m_sBuffer.find("\n"); + string::size_type iFind = m_sBuffer.find("\n"); if (iFind != string::npos) { return true; } diff --git a/znc.cpp b/znc.cpp index dcb1e331..b126ff22 100644 --- a/znc.cpp +++ b/znc.cpp @@ -191,7 +191,7 @@ void CZNC::InitDirs(const string& sArgvPath) { getcwd(buf, PATH_MAX); // If the bin was not ran from the current directory, we need to add that dir onto our cwd - unsigned int uPos = sArgvPath.rfind('/'); + string::size_type uPos = sArgvPath.rfind('/'); m_sCurPath = (uPos == string::npos) ? string(buf) : CUtils::ChangeDir(buf, sArgvPath.substr(0, uPos), ""); // Try to set the user's home dir, default to binpath on failure