Skip to content

Commit 204d30e

Browse files
artempDane Springmeyer
authored and
Dane Springmeyer
committed
simplify hash calculation (we don't need combine with which(), using hash<T> is sufficient)
1 parent 8dee1a9 commit 204d30e

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

include/mapnik/value_hash.hpp

+1-9
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,6 @@ struct value_hasher
5454
return static_cast<std::size_t>(val.hashCode());
5555
}
5656

57-
std::size_t operator()(value_integer val) const
58-
{
59-
return static_cast<std::size_t>(val);
60-
}
61-
6257
template <class T>
6358
std::size_t operator()(T const& val) const
6459
{
@@ -72,10 +67,7 @@ struct value_hasher
7267
template <typename T>
7368
std::size_t mapnik_hash_value(T const& val)
7469
{
75-
std::size_t seed = 0;
76-
detail::hash_combine(seed, util::apply_visitor(detail::value_hasher(), val));
77-
detail::hash_combine(seed, val.which());
78-
return seed;
70+
return util::apply_visitor(detail::value_hasher(), val);
7971
}
8072

8173
} // namespace mapnik

0 commit comments

Comments
 (0)