mirror of
https://github.com/zebrajr/ladybird.git
synced 2025-12-06 00:19:53 +01:00
AK: Remove unused Jakt methods
This commit is contained in:
parent
029bcf13fd
commit
e2b863ed3f
|
|
@ -74,13 +74,6 @@ public:
|
|||
return from_string_view(StringView { string_literal, N - 1 });
|
||||
}
|
||||
|
||||
// Note: Don't call this from C++; it's here for Jakt interop (as the name suggests).
|
||||
template<SameAs<StringView> T>
|
||||
ALWAYS_INLINE static Error __jakt_from_string_literal(T string)
|
||||
{
|
||||
return from_string_view(string);
|
||||
}
|
||||
|
||||
bool operator==(Error const& other) const
|
||||
{
|
||||
return m_code == other.m_code && m_string_literal == other.m_string_literal && m_kind == other.m_kind;
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ namespace AK {
|
|||
class StringView {
|
||||
public:
|
||||
ALWAYS_INLINE constexpr StringView() = default;
|
||||
|
||||
ALWAYS_INLINE constexpr StringView(char const* characters, size_t length)
|
||||
: m_characters(characters)
|
||||
, m_length(length)
|
||||
|
|
@ -29,24 +30,20 @@ public:
|
|||
if (!is_constant_evaluated())
|
||||
VERIFY(!Checked<uintptr_t>::addition_would_overflow(reinterpret_cast<uintptr_t>(characters), length));
|
||||
}
|
||||
|
||||
ALWAYS_INLINE StringView(unsigned char const* characters, size_t length)
|
||||
: m_characters(reinterpret_cast<char const*>(characters))
|
||||
, m_length(length)
|
||||
{
|
||||
VERIFY(!Checked<uintptr_t>::addition_would_overflow(reinterpret_cast<uintptr_t>(characters), length));
|
||||
}
|
||||
|
||||
ALWAYS_INLINE StringView(ReadonlyBytes bytes)
|
||||
: m_characters(reinterpret_cast<char const*>(bytes.data()))
|
||||
, m_length(bytes.size())
|
||||
{
|
||||
}
|
||||
|
||||
// Note: This is here for Jakt.
|
||||
ALWAYS_INLINE static StringView from_string_literal(StringView string)
|
||||
{
|
||||
return string;
|
||||
}
|
||||
|
||||
StringView(ByteBuffer const&);
|
||||
StringView(String const&);
|
||||
StringView(FlyString const&);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user