mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-27 01:56:21 +00:00
AK: Make StringView::hash() constexpr
This required moving string_hash() to its own header so that everyone can see it.
This commit is contained in:
@@ -214,13 +214,6 @@ template Optional<u64> StringView::to_uint() const;
|
||||
template Optional<long> StringView::to_uint() const;
|
||||
template Optional<long long> StringView::to_uint() const;
|
||||
|
||||
unsigned StringView::hash() const
|
||||
{
|
||||
if (is_empty())
|
||||
return 0;
|
||||
return string_hash(characters_without_null_termination(), length());
|
||||
}
|
||||
|
||||
bool StringView::operator==(const String& string) const
|
||||
{
|
||||
if (string.is_null())
|
||||
|
||||
Reference in New Issue
Block a user