hashing bugfix: '<<' rather than '<<=' operator was used
This commit is contained in:
parent
a7ada7d65b
commit
2c320effc6
2 changed files with 4 additions and 4 deletions
|
|
@ -92,9 +92,9 @@ Py_hash_t PyColor::hash(PyObject* obj)
|
||||||
auto self = (PyColorObject*)obj;
|
auto self = (PyColorObject*)obj;
|
||||||
Py_hash_t value = 0;
|
Py_hash_t value = 0;
|
||||||
value += self->data.r;
|
value += self->data.r;
|
||||||
value << 8; value += self->data.g;
|
value <<= 8; value += self->data.g;
|
||||||
value << 8; value += self->data.b;
|
value <<= 8; value += self->data.b;
|
||||||
value << 8; value += self->data.a;
|
value <<= 8; value += self->data.a;
|
||||||
|
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -160,7 +160,7 @@ Py_hash_t PyVector::hash(PyObject* obj)
|
||||||
auto self = (PyVectorObject*)obj;
|
auto self = (PyVectorObject*)obj;
|
||||||
Py_hash_t value = 0;
|
Py_hash_t value = 0;
|
||||||
value += self->data.x;
|
value += self->data.x;
|
||||||
value << 8; value += self->data.y;
|
value <<= 8; value += self->data.y;
|
||||||
|
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue