depth: use hash_all()

This commit is contained in:
Justin Viiret 2017-03-30 17:00:52 +11:00 committed by Matthew Barr
parent 5d1922327e
commit aa4ae755d8

View File

@ -34,14 +34,13 @@
#define DEPTH_H #define DEPTH_H
#include "ue2common.h" #include "ue2common.h"
#include "util/hash.h"
#include "util/operators.h" #include "util/operators.h"
#ifdef DUMP_SUPPORT #ifdef DUMP_SUPPORT
#include <string> #include <string>
#endif #endif
#include <boost/functional/hash/hash_fwd.hpp>
namespace ue2 { namespace ue2 {
/** /**
@ -258,13 +257,11 @@ struct DepthMinMax : totally_ordered<DepthMinMax> {
/** \brief Render as a string, useful for debugging. */ /** \brief Render as a string, useful for debugging. */
std::string str() const; std::string str() const;
#endif #endif
}; };
inline size_t hash_value(const DepthMinMax &d) { inline size_t hash_value(const DepthMinMax &d) {
size_t val = 0; return hash_all(d.min, d.max);
boost::hash_combine(val, d.min);
boost::hash_combine(val, d.max);
return val;
} }
/** /**