1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 05:47:35 +00:00

LibWeb: Use int-hash for CSSPixels

This commit is contained in:
Hendiadyoin1 2023-07-26 16:05:11 +02:00 committed by Alexander Kalenik
parent 6c341ca985
commit 36dcb0ada7

View file

@ -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)