1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 08:14:58 +00:00

AK: Make FlyString-to-FlyString comparison inline & trivial

This should never boil down to more than a machine word comparison.
This commit is contained in:
Andreas Kling 2024-03-13 11:42:36 +01:00
parent bc23c5b9fe
commit d125a76f85
3 changed files with 4 additions and 6 deletions

View file

@ -6,6 +6,7 @@
#pragma once
#include <AK/Badge.h>
#include <AK/Endian.h>
#include <AK/Forward.h>
@ -70,6 +71,8 @@ public:
void did_create_fly_string(Badge<FlyString>) const;
[[nodiscard]] ALWAYS_INLINE FlatPtr raw(Badge<FlyString>) const { return bit_cast<FlatPtr>(m_data); }
protected:
template<typename Func>
ErrorOr<void> replace_with_new_string(size_t byte_count, Func&& callback)