From 0451d51f4da9780e2f650b67672a29b3d07cb386 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Thu, 27 Oct 2022 11:27:21 -0500 Subject: SL-18459 WIP -- fix for assert in setGLTFMaterial --- indra/llcommon/llpointer.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'indra/llcommon/llpointer.h') diff --git a/indra/llcommon/llpointer.h b/indra/llcommon/llpointer.h index 9a6453ea48..f9de0c7929 100644 --- a/indra/llcommon/llpointer.h +++ b/indra/llcommon/llpointer.h @@ -340,4 +340,28 @@ private: bool mStayUnique; }; + +// boost hash adapter +template +struct boost::hash> +{ + typedef LLPointer argument_type; + typedef std::size_t result_type; + result_type operator()(argument_type const& s) const + { + return (std::size_t) s.get(); + } +}; + +// Adapt boost hash to std hash +namespace std +{ + template struct hash> + { + std::size_t operator()(LLPointer const& s) const noexcept + { + return boost::hash>()(s); + } + }; +} #endif -- cgit v1.2.3