From d70752820947cf072819386c59fca60c1649eea7 Mon Sep 17 00:00:00 2001 From: Davis King Date: Sun, 20 Jan 2013 23:50:44 -0500 Subject: [PATCH] Changed general_hash so it uses dlib::hash to hash integers rather than returning them unmodified. --- dlib/general_hash/general_hash.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/dlib/general_hash/general_hash.h b/dlib/general_hash/general_hash.h index 0781fa98d..3de0b2698 100644 --- a/dlib/general_hash/general_hash.h +++ b/dlib/general_hash/general_hash.h @@ -26,7 +26,6 @@ namespace dlib const T& item ) const; }; - /*! 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. @@ -55,8 +54,8 @@ namespace dlib const T& item ) const { - // hash any types that have a conversion to unsigned long - return static_cast(item); + // hash any types that have a conversion to uint64 + return hash(static_cast(item)); }