mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-11 12:06:07 +00:00
LibWeb: Use int-hash for CSSPixels
This commit is contained in:
parent
6c341ca985
commit
36dcb0ada7
Notes:
sideshowbarker
2024-07-17 10:10:18 +09:00
Author: https://github.com/Hendiadyoin1
Commit: 36dcb0ada7
Pull-request: https://github.com/SerenityOS/serenity/pull/20210
Reviewed-by: https://github.com/kalenikaliaksandr ✅
1 changed files with 1 additions and 2 deletions
|
@ -283,8 +283,7 @@ template<>
|
||||||
struct Traits<Web::CSSPixels> : public GenericTraits<Web::CSSPixels> {
|
struct Traits<Web::CSSPixels> : public GenericTraits<Web::CSSPixels> {
|
||||||
static unsigned hash(Web::CSSPixels const& key)
|
static unsigned hash(Web::CSSPixels const& key)
|
||||||
{
|
{
|
||||||
VERIFY(isfinite(key.to_double()));
|
return Traits<int>::hash(key.raw_value());
|
||||||
return Traits<double>::hash(key.to_double());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool equals(Web::CSSPixels const& a, Web::CSSPixels const& b)
|
static bool equals(Web::CSSPixels const& a, Web::CSSPixels const& b)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue