From 944653463fe4134c82d85e2d01e2bc0fa43fd727 Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Thu, 12 Sep 2019 11:12:37 +0900 Subject: Introduce HashQ<> and UnorderedMap<> Invading into std:: is frowned upon, even though legitimate from the C++ standard perspective. Given that it's possible to pass a hash object to unordered_map, it only takes an alias for std::unordered_map to avoid having to specialize std::hash. And besides, a generic compatibility bridge between qHash and std::hash has been long needed. std::hash in converters.h remains for now; it will be dropped separately when the API files get regenerated to use UnorderedMap. --- lib/events/stateevent.h | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'lib/events/stateevent.h') diff --git a/lib/events/stateevent.h b/lib/events/stateevent.h index 74e36e74..710b4271 100644 --- a/lib/events/stateevent.h +++ b/lib/events/stateevent.h @@ -129,13 +129,3 @@ private: std::unique_ptr> _prev; }; } // namespace Quotient - -namespace std { -template <> -struct hash { - size_t operator()(const Quotient::StateEventKey& k) const Q_DECL_NOEXCEPT - { - return qHash(k); - } -}; -} // namespace std -- cgit v1.2.3