From 9b4b87765d48d2d6aed6ac1f40c4aa2684fad766 Mon Sep 17 00:00:00 2001 From: Dominick Allen Date: Sun, 3 Nov 2024 09:31:59 -0600 Subject: Correct String::grow. --- source/fud_string.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'source') diff --git a/source/fud_string.cpp b/source/fud_string.cpp index 33e41c3..fa34cc9 100644 --- a/source/fud_string.cpp +++ b/source/fud_string.cpp @@ -354,13 +354,8 @@ FudStatus String::grow() return reserveStatus; } - auto newCapacity = cap < maxStringLength / 2 ? cap * 2 : maxStringLength - 1U; - const auto resizeStatus = resize(newCapacity); - if (resizeStatus != FudStatus::Success) { - return resizeStatus; - } fudAssert(isLarge()); - fudAssert(m_repr.large.capacity == newCapacity); + return FudStatus::Success; } FudStatus String::reserve(size_t newCapacity) -- cgit v1.2.3