mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-09 09:34:57 +09:00
AK: Remove unused Jakt methods
This commit is contained in:
parent
029bcf13fd
commit
e2b863ed3f
Notes:
github-actions[bot]
2025-05-11 01:21:31 +00:00
Author: https://github.com/trflynn89
Commit: e2b863ed3f
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4689
2 changed files with 3 additions and 13 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue