From db77e126153e53d3224194e523bf3ee74ebcdf2d Mon Sep 17 00:00:00 2001 From: Borja Ferrer Date: Tue, 15 Nov 2005 20:21:29 +0000 Subject: [PATCH] synced with sh_string.h --- amxmodx/CString.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/amxmodx/CString.h b/amxmodx/CString.h index 1a9e3ac9..4fe52b15 100755 --- a/amxmodx/CString.h +++ b/amxmodx/CString.h @@ -66,7 +66,7 @@ public: return ret; } - String(String &src) + String(const String &src) { v = NULL; a_size = 0; @@ -148,13 +148,13 @@ public: int find(const char c, int index = 0) { - size_t len = size(); + int len = static_cast(size()); if (len < 1) return npos; - if (index >= (int)len || index < 0) + if (index >= len || index < 0) return npos; - unsigned int i = 0; - for (i=index; i<(int)len; i++) + int i = 0; + for (i=index; i len-num+1) + if (num == npos || start+num > len-start) num = len - start; //do the erasing bool copyflag = false; @@ -297,7 +297,7 @@ public: num = len - index; } - unsigned int i = 0, j=0; + unsigned int i = 0; unsigned int nslen = num + 2; ns.Grow(nslen);