From 332e9e76d5cd976ffc4453032018a5bf584929fc Mon Sep 17 00:00:00 2001 From: Gabriel Guedes Date: Sat, 29 Aug 2020 10:14:44 -0300 Subject: [PATCH] Part of #11159: Removing unused functions from StringBuilder.hpp --- src/openrct2/core/StringBuilder.hpp | 46 ----------------------------- 1 file changed, 46 deletions(-) diff --git a/src/openrct2/core/StringBuilder.hpp b/src/openrct2/core/StringBuilder.hpp index 3a9a81f003..aa5b36e2dd 100644 --- a/src/openrct2/core/StringBuilder.hpp +++ b/src/openrct2/core/StringBuilder.hpp @@ -94,44 +94,6 @@ public: } } - /** - * Like Clear, only will guarantee freeing of the underlying buffer. - */ - void Reset() - { - _length = 0; - _capacity = 0; - SafeFree(_buffer); - } - - /** - * Resets the StringBuilder and returns the working buffer (resized to the string size). - */ - utf8* StealString() - { - utf8* result = _buffer; - result = Memory::ReallocateArray(result, _length + 1); - result[_length] = 0; - - _length = 0; - _capacity = 0; - _buffer = nullptr; - - return result; - } - - /** - * Returns the current string buffer as a new fire-and-forget string. - */ - utf8* GetString() const - { - // If buffer is null, length should be 0 which will create a new one byte memory block containing a null terminator - utf8* result = Memory::AllocateArray(_length + 1); - std::copy_n(_buffer, _length, result); - result[_length] = 0; - return result; - } - /** * Returns the current string buffer as a standard string. */ @@ -152,14 +114,6 @@ public: return _buffer; } - /** - * Gets the amount of allocated memory for the string buffer. - */ - size_t GetCapacity() const - { - return _capacity; - } - /** * Gets the length of the current string. */