mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 03:27:34 +00:00
AK+Everywhere: Rename FlyString to DeprecatedFlyString
DeprecatedFlyString relies heavily on DeprecatedString's StringImpl, so let's rename it to A) match the name of DeprecatedString, B) write a new FlyString class that is tied to String.
This commit is contained in:
parent
2eacc7aec1
commit
f3db548a3d
316 changed files with 1177 additions and 1177 deletions
|
@ -6,7 +6,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <AK/FlyString.h>
|
||||
#include <AK/DeprecatedFlyString.h>
|
||||
#include <LibJS/Runtime/PrimitiveString.h>
|
||||
#include <LibJS/Runtime/Symbol.h>
|
||||
#include <LibJS/Runtime/Value.h>
|
||||
|
@ -18,16 +18,16 @@ public:
|
|||
StringOrSymbol() = default;
|
||||
|
||||
StringOrSymbol(char const* chars)
|
||||
: StringOrSymbol(FlyString(chars))
|
||||
: StringOrSymbol(DeprecatedFlyString(chars))
|
||||
{
|
||||
}
|
||||
|
||||
StringOrSymbol(DeprecatedString const& string)
|
||||
: StringOrSymbol(FlyString(string))
|
||||
: StringOrSymbol(DeprecatedFlyString(string))
|
||||
{
|
||||
}
|
||||
|
||||
StringOrSymbol(FlyString const& string)
|
||||
StringOrSymbol(DeprecatedFlyString const& string)
|
||||
: m_ptr(string.impl())
|
||||
{
|
||||
VERIFY(!string.is_null());
|
||||
|
@ -62,10 +62,10 @@ public:
|
|||
ALWAYS_INLINE bool is_symbol() const { return is_valid() && (bits() & 1ul); }
|
||||
ALWAYS_INLINE bool is_string() const { return is_valid() && !(bits() & 1ul); }
|
||||
|
||||
ALWAYS_INLINE FlyString as_string() const
|
||||
ALWAYS_INLINE DeprecatedFlyString as_string() const
|
||||
{
|
||||
VERIFY(is_string());
|
||||
return FlyString::from_fly_impl(as_string_impl());
|
||||
return DeprecatedFlyString::from_fly_impl(as_string_impl());
|
||||
}
|
||||
|
||||
ALWAYS_INLINE Symbol const* as_symbol() const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue