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 /io | |
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 'io')
-rw-r--r-- | io/source/acceptor/acc_socket.cxx | 23 | ||||
-rw-r--r-- | io/source/connector/connector.hxx | 23 |
2 files changed, 2 insertions, 44 deletions
diff --git a/io/source/acceptor/acc_socket.cxx b/io/source/acceptor/acc_socket.cxx index b070761b2b60..ba6938928bbe 100644 --- a/io/source/acceptor/acc_socket.cxx +++ b/io/source/acceptor/acc_socket.cxx @@ -37,29 +37,8 @@ using namespace ::com::sun::star::connection; namespace io_acceptor { - template<class T> - struct ReferenceHash - { - size_t operator () (const css::uno::Reference<T> & ref) const - { - return reinterpret_cast<size_t>(ref.get()); - } - }; - - template<class T> - struct ReferenceEqual - { - bool operator () (const css::uno::Reference<T> & op1, - const css::uno::Reference<T> & op2) const - { - return op1.get() == op2.get(); - } - }; - - typedef std::unordered_set< css::uno::Reference< css::io::XStreamListener>, - ReferenceHash< css::io::XStreamListener>, - ReferenceEqual< css::io::XStreamListener> > + typedef std::unordered_set< css::uno::Reference< css::io::XStreamListener> > XStreamListener_hash_set; diff --git a/io/source/connector/connector.hxx b/io/source/connector/connector.hxx index 1c5b585c5e68..9aad55a45dfa 100644 --- a/io/source/connector/connector.hxx +++ b/io/source/connector/connector.hxx @@ -31,28 +31,7 @@ namespace stoc_connector { - template<class T> - struct ReferenceHash - { - size_t operator () (const css::uno::Reference<T> & ref) const - { - return reinterpret_cast<size_t>(ref.get()); - } - }; - - template<class T> - struct ReferenceEqual - { - bool operator () (const css::uno::Reference<T> & op1, - const css::uno::Reference<T> & op2) const - { - return op1.get() == op2.get(); - } - }; - - typedef std::unordered_set< css::uno::Reference< css::io::XStreamListener>, - ReferenceHash< css::io::XStreamListener>, - ReferenceEqual< css::io::XStreamListener> > + typedef std::unordered_set< css::uno::Reference< css::io::XStreamListener> > XStreamListener_hash_set; class PipeConnection : |