mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 00:57:45 +00:00
AK: Make StringView hashable
This commit is contained in:
parent
6e05685ad4
commit
67f2301150
1 changed files with 5 additions and 0 deletions
|
@ -187,6 +187,11 @@ private:
|
||||||
size_t m_length { 0 };
|
size_t m_length { 0 };
|
||||||
};
|
};
|
||||||
|
|
||||||
|
template<>
|
||||||
|
struct Traits<StringView> : public GenericTraits<String> {
|
||||||
|
static unsigned hash(const StringView& s) { return s.hash(); }
|
||||||
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
using AK::StringView;
|
using AK::StringView;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue