Rename the memory allocating versions to make prev error less likely

The behavior is different enough that these shouldn't be overloaded
with the non-allocating verions. Also makes it more obvious what is
going on to the caller.
This commit is contained in:
Ben Payne 2015-01-23 16:09:01 -05:00
parent d669eb6ee7
commit fcf52fb5e0
9 changed files with 17 additions and 17 deletions

View file

@ -186,7 +186,7 @@ void StringBuffer::append(const UTF8* in)
// convert to UTF16, because that's our internal format.
// if the conversion fails, exit.
UTF16* tmp = convertUTF8toUTF16(in);
UTF16* tmp = createUTF16string(in);
AssertFatal(tmp, "StringBuffer::append(UTF8) - could not convert UTF8 string!");
if(!tmp)
return;
@ -231,7 +231,7 @@ void StringBuffer::insert(const U32 charOffset, const UTF8* in)
// convert to UTF16, because that's our internal format.
// if the conversion fails, exit.
UTF16* tmp = convertUTF8toUTF16(in);
UTF16* tmp = createUTF16string(in);
AssertFatal(tmp, "StringBuffer::insert(UTF8) - could not convert UTF8 string!");
if(!tmp)
return;
@ -377,7 +377,7 @@ UTF8* StringBuffer::createCopy8() const
incRequestCount8();
// convert will create a buffer of the appropriate size for a null terminated
// input string.
UTF8* out = convertUTF16toUTF8(mBuffer.address());
UTF8* out = createUTF8string(mBuffer.address());
return out;
}