mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-03 08:08:43 +00:00
AK: Move String::~String() and String::destroy_string() to StringBase
This commit is contained in:
parent
54d149bc25
commit
1b09a1851e
Notes:
sideshowbarker
2024-07-17 09:56:35 +09:00
Author: https://github.com/DanShaders
Commit: 1b09a1851e
Pull-request: https://github.com/SerenityOS/serenity/pull/21661
Reviewed-by: https://github.com/ADKaster
Reviewed-by: https://github.com/alimpfard
Reviewed-by: https://github.com/kleinesfilmroellchen
Reviewed-by: https://github.com/trflynn89
4 changed files with 15 additions and 14 deletions
|
@ -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<>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue