Commit d7075282 authored by Davis King's avatar Davis King

Changed general_hash so it uses dlib::hash to hash integers rather

than returning them unmodified.
parent 6391a034
...@@ -26,7 +26,6 @@ namespace dlib ...@@ -26,7 +26,6 @@ namespace dlib
const T& item const T& item
) const; ) const;
}; };
/*! /*!
Note that the default behavior of general hash is to attempt to cast Note that the default behavior of general hash is to attempt to cast
an object of type T to an unsigned long and use that as the hash. an object of type T to an unsigned long and use that as the hash.
...@@ -55,8 +54,8 @@ namespace dlib ...@@ -55,8 +54,8 @@ namespace dlib
const T& item const T& item
) const ) const
{ {
// hash any types that have a conversion to unsigned long // hash any types that have a conversion to uint64
return static_cast<unsigned long>(item); return hash(static_cast<uint64>(item));
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment