From 94b55db8215e709a40cc562df3d8e1540e6b5174 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sat, 28 Sep 2002 19:25:09 +0000 Subject: patch #612722: MI2 NewGui title fix svn-id: r5030 --- common/str.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'common/str.cpp') diff --git a/common/str.cpp b/common/str.cpp index 874b99938e..7b33b29c30 100644 --- a/common/str.cpp +++ b/common/str.cpp @@ -20,13 +20,10 @@ #include "stdafx.h" #include "str.h" -#include "util.h" #ifdef _MSC_VER - # pragma warning( disable : 4068 ) // unknown pragmas - #endif @@ -39,7 +36,7 @@ String::String(const char *str, int len) if (len > 0) _capacity = _len = len; else - _capacity = _len = resStrLen(str); + _capacity = _len = strlen(str); _str = (char *)calloc(1, _capacity+1); memcpy(_str, str, _len); _str[_len] = 0; @@ -54,7 +51,7 @@ String::String(const ConstString &str) printf("String::String(const ConstString &str)\n"); _refCount = new int(1); if (str._str) { - _capacity = _len = resStrLen(str._str); + _capacity = _len = strlen(str._str); _str = (char *)calloc(1, _capacity+1); memcpy(_str, str._str, _len+1); } else { @@ -90,7 +87,7 @@ void String::decRefCount() String& String::operator =(const char* str) { - int len = resStrLen(str); + int len = strlen(str); if (len > 0) { ensureCapacity(len, false); @@ -123,7 +120,7 @@ String& String::operator =(const String& str) String& String::operator +=(const char* str) { - int len = resStrLen(str); + int len = strlen(str); if (len > 0) { ensureCapacity(_len + len, true); -- cgit v1.2.3