aboutsummaryrefslogtreecommitdiffstats
path: root/LibOVR/Src/Kernel/OVR_String.cpp
diff options
context:
space:
mode:
authorBrad Davis <[email protected]>2014-05-23 01:49:32 -0700
committerBrad Davis <[email protected]>2014-05-23 01:49:32 -0700
commit46acc0e194ff3c1f120199eeca8324b4502118e9 (patch)
treeb1030198d3ee4698445d1fc5161cebe4158e45d1 /LibOVR/Src/Kernel/OVR_String.cpp
parent07d0f4d0bbf3477ac6a9584f726e8ec6ab285707 (diff)
Updating to 0.3.2 (windows version)
Diffstat (limited to 'LibOVR/Src/Kernel/OVR_String.cpp')
-rw-r--r--LibOVR/Src/Kernel/OVR_String.cpp11
1 files changed, 8 insertions, 3 deletions
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)