diff options
author | Dominick Allen <djallen@librehumanitas.org> | 2024-11-03 09:31:59 -0600 |
---|---|---|
committer | Dominick Allen <djallen@librehumanitas.org> | 2024-11-03 09:31:59 -0600 |
commit | 9b4b87765d48d2d6aed6ac1f40c4aa2684fad766 (patch) | |
tree | 16946af27db944cc9a915a55cbd9fd779adca6d5 /source | |
parent | c3fe2de828576900021d27a52114ebdb0a4cb6f0 (diff) |
Correct String::grow.
Diffstat (limited to 'source')
-rw-r--r-- | source/fud_string.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
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) |