mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 18:03:56 -04:00
whoops, const void
This commit is contained in:
parent
7ccbc378f4
commit
89d07d7c4a
@ -134,7 +134,7 @@ add_hash(size_t hash, const Key &key) {
|
|||||||
// Description: Adds the indicated key into a running hash.
|
// Description: Adds the indicated key into a running hash.
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
INLINE size_t pointer_hash::
|
INLINE size_t pointer_hash::
|
||||||
add_hash(size_t hash, void *key) {
|
add_hash(size_t hash, const void *key) {
|
||||||
// We don't mind if this loses precision.
|
// We don't mind if this loses precision.
|
||||||
PN_uint32 key32 = (PN_uint32)reinterpret_cast<unsigned long>(key);
|
PN_uint32 key32 = (PN_uint32)reinterpret_cast<unsigned long>(key);
|
||||||
return AddHash::add_hash(hash, &key32, 1);
|
return AddHash::add_hash(hash, &key32, 1);
|
||||||
|
@ -150,9 +150,9 @@ public:
|
|||||||
// the Key is a pointer value. It is the same as the
|
// the Key is a pointer value. It is the same as the
|
||||||
// system-provided hash_compare.
|
// system-provided hash_compare.
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
class pointer_hash : public stl_hash_compare<void *, less<void *> > {
|
class pointer_hash : public stl_hash_compare<const void *, less<const void *> > {
|
||||||
public:
|
public:
|
||||||
INLINE static size_t add_hash(size_t start, void *key);
|
INLINE static size_t add_hash(size_t start, const void *key);
|
||||||
};
|
};
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
|
Loading…
x
Reference in New Issue
Block a user