From 46acc0e194ff3c1f120199eeca8324b4502118e9 Mon Sep 17 00:00:00 2001 From: Brad Davis Date: Fri, 23 May 2014 01:49:32 -0700 Subject: Updating to 0.3.2 (windows version) --- LibOVR/Src/Kernel/OVR_String.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'LibOVR/Src/Kernel/OVR_String.cpp') diff --git a/LibOVR/Src/Kernel/OVR_String.cpp b/LibOVR/Src/Kernel/OVR_String.cpp index 86aa126..75b7c0e 100644 --- a/LibOVR/Src/Kernel/OVR_String.cpp +++ b/LibOVR/Src/Kernel/OVR_String.cpp @@ -569,7 +569,7 @@ StringBuffer::StringBuffer(UPInt growSize) StringBuffer::StringBuffer(const char* data) : pData(NULL), Size(0), BufferSize(0), GrowSize(OVR_SBUFF_DEFAULT_GROW_SIZE), LengthIsSize(false) { - *this = data; + AppendString(data); } StringBuffer::StringBuffer(const char* data, UPInt dataSize) @@ -585,10 +585,9 @@ StringBuffer::StringBuffer(const String& src) } StringBuffer::StringBuffer(const StringBuffer& src) - : pData(NULL), Size(0), BufferSize(src.GetGrowSize()), GrowSize(OVR_SBUFF_DEFAULT_GROW_SIZE), LengthIsSize(false) + : pData(NULL), Size(0), BufferSize(0), GrowSize(OVR_SBUFF_DEFAULT_GROW_SIZE), LengthIsSize(false) { AppendString(src.ToCStr(), src.GetSize()); - LengthIsSize = src.LengthIsSize; } StringBuffer::StringBuffer(const wchar_t* data) @@ -728,6 +727,12 @@ void StringBuffer::operator = (const String& src) memcpy(pData, src.ToCStr(), src.GetSize()); } +void StringBuffer::operator = (const StringBuffer& src) +{ + Clear(); + AppendString(src.ToCStr(), src.GetSize()); +} + // Inserts substr at posAt void StringBuffer::Insert(const char* substr, UPInt posAt, SPInt len) -- cgit v1.2.3