diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-04-29 16:24:12 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-04-30 08:43:04 +0200 |
commit | 22f2cf3ccc6d0c9ba2c2860735e789d6b3a25f72 (patch) | |
tree | f20474881dd71d3f815a964718a3b7dbcc53340a /include/com/sun/star | |
parent | f9f7cc62e95f12a9d4ea02413a658d40e09ccde6 (diff) |
implement std::hash for css::uno::Reference and rtl::Reference
The declaration in BarChart.cxx is particularly suspicious, because it
was using a < for the KeyEqual template parameter.
Been there since:
commit b2c3233e5f267b5d244d722a94424a3b224b3314
Date: Thu Dec 21 20:08:33 2017 +0900
chart2: suspend/resume setting rects dirty for 3D shapes
comphelper::OInterfaceCompare is no longer necessary
Change-Id: I8278c4a3d9113a18570ca237cd05d553ec8f3975
Reviewed-on: https://gerrit.libreoffice.org/71537
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/com/sun/star')
-rw-r--r-- | include/com/sun/star/uno/Reference.hxx | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/include/com/sun/star/uno/Reference.hxx b/include/com/sun/star/uno/Reference.hxx index d822c97aeb2d..c6869d922d7e 100644 --- a/include/com/sun/star/uno/Reference.hxx +++ b/include/com/sun/star/uno/Reference.hxx @@ -450,6 +450,26 @@ operator <<( } } +#if defined LIBO_INTERNAL_ONLY +namespace std +{ + +/** + Make css::uno::Reference hashable by default for use in STL containers. + + @since LibreOffice 6.3 +*/ +template<typename T> +struct hash<::css::uno::Reference<T>> +{ + std::size_t operator()(::css::uno::Reference<T> const & s) const + { return size_t(s.get()); } +}; + +} + +#endif + #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |