2
0
David Rose 18 жил өмнө
parent
commit
89d07d7c4a

+ 1 - 1
dtool/src/dtoolbase/stl_compares.I

@@ -134,7 +134,7 @@ add_hash(size_t hash, const Key &key) {
 //  Description: Adds the indicated key into a running 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.
   PN_uint32 key32 = (PN_uint32)reinterpret_cast<unsigned long>(key);
   return AddHash::add_hash(hash, &key32, 1);

+ 2 - 2
dtool/src/dtoolbase/stl_compares.h

@@ -150,9 +150,9 @@ public:
 //               the Key is a pointer value.  It is the same as the
 //               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:
-  INLINE static size_t add_hash(size_t start, void *key);
+  INLINE static size_t add_hash(size_t start, const void *key);
 };
 
 ////////////////////////////////////////////////////////////////////