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> {
static unsigned hash(Web::CSSPixels const& key)
{
VERIFY(isfinite(key.to_double()));
return Traits<double>::hash(key.to_double());
return Traits<int>::hash(key.raw_value());
}
static bool equals(Web::CSSPixels const& a, Web::CSSPixels const& b)