1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 15:07:45 +00:00

AK: Move String::~String() and String::destroy_string() to StringBase

This commit is contained in:
Dan Klishch 2023-10-28 15:42:33 -04:00 committed by Andrew Kaster
parent 54d149bc25
commit 1b09a1851e
4 changed files with 15 additions and 14 deletions

View file

@ -48,12 +48,6 @@ public:
using StringBase::StringBase;
constexpr ~String()
{
if (!is_constant_evaluated())
destroy_string();
}
// Creates an empty (zero-length) String.
constexpr String()
: StringBase(ShortString { SHORT_STRING_FLAG, {} })
@ -209,8 +203,6 @@ public:
private:
using ShortString = Detail::ShortString;
void destroy_string();
};
template<>