whoops, const void

This commit is contained in:
David Rose 2008-03-21 22:39:40 +00:00
parent 7ccbc378f4
commit 89d07d7c4a
2 changed files with 3 additions and 3 deletions

View File

@ -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);

View File

@ -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);
}; };
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////