Optimize String::ReserveSpace if length doesn't change

This commit is contained in:
Wojtek Figat
2022-01-02 00:48:29 +01:00
parent 0abb303e8d
commit 68d8766c56

View File

@@ -337,6 +337,8 @@ public:
void ReserveSpace(int32 length)
{
ASSERT(length >= 0);
if (length == _length)
return;
Platform::Free(_data);
if (length != 0)
{