From 204d30e58d3553278ab6bcda2d4122b0f13f6392 Mon Sep 17 00:00:00 2001 From: artemp Date: Tue, 13 Dec 2016 15:50:00 +0100 Subject: [PATCH] simplify hash calculation (we don't need combine with which(), using hash is sufficient) --- include/mapnik/value_hash.hpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/include/mapnik/value_hash.hpp b/include/mapnik/value_hash.hpp index 80e10d855..f1119e0b3 100644 --- a/include/mapnik/value_hash.hpp +++ b/include/mapnik/value_hash.hpp @@ -54,11 +54,6 @@ struct value_hasher return static_cast(val.hashCode()); } - std::size_t operator()(value_integer val) const - { - return static_cast(val); - } - template std::size_t operator()(T const& val) const { @@ -72,10 +67,7 @@ struct value_hasher template std::size_t mapnik_hash_value(T const& val) { - std::size_t seed = 0; - detail::hash_combine(seed, util::apply_visitor(detail::value_hasher(), val)); - detail::hash_combine(seed, val.which()); - return seed; + return util::apply_visitor(detail::value_hasher(), val); } } // namespace mapnik