From e816c86d7ab329ac13e9808812a5b410e401dfa1 Mon Sep 17 00:00:00 2001 From: Borja Ferrer Date: Tue, 15 Nov 2005 20:48:11 +0000 Subject: [PATCH] synced with sh_sting.h --- dlls/engine/CString.h | 14 +++++++------- dlls/nvault/CString.h | 12 ++++++------ dlls/sqlite/CString.h | 14 +++++++------- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/dlls/engine/CString.h b/dlls/engine/CString.h index 1a9e3ac9..4fe52b15 100755 --- a/dlls/engine/CString.h +++ b/dlls/engine/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); diff --git a/dlls/nvault/CString.h b/dlls/nvault/CString.h index 54b2b2b8..4fe52b15 100755 --- a/dlls/nvault/CString.h +++ b/dlls/nvault/CString.h @@ -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); diff --git a/dlls/sqlite/CString.h b/dlls/sqlite/CString.h index 1a9e3ac9..4fe52b15 100755 --- a/dlls/sqlite/CString.h +++ b/dlls/sqlite/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);