Optimize g_double_hash implementation

This commit is contained in:
wszqkzqk 2022-09-26 08:26:27 +08:00 committed by Marco Trevisan (Treviño)
parent f0dd96c287
commit dd1f4f709e

View File

@ -2531,5 +2531,5 @@ g_double_equal (gconstpointer v1,
guint
g_double_hash (gconstpointer v)
{
return (guint) *(const gdouble*) v;
return (guint) ((const guint) (*(guint64 *) v >> 32)) ^ (*(const guint *) v);
}