diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-01-16 11:02:46 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2024-02-09 20:09:40 +0100 |
commit | 177e7968711c330a5b66826e6338bc9a605eeac9 (patch) | |
tree | 157c668e4d314ec13475b9c62f75f29aeede9b83 /include | |
parent | 30df4b8e48fa757cc0d90112743b58d6202a066b (diff) |
improve loplugin:cow_wrapper
some stuff was hiding inside templates
Change-Id: I89fd1a926dd6bf96e35a74e5028165acae51c60c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162159
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163100
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/comphelper/interfacecontainer3.hxx | 4 | ||||
-rw-r--r-- | include/comphelper/interfacecontainer4.hxx | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/include/comphelper/interfacecontainer3.hxx b/include/comphelper/interfacecontainer3.hxx index 02f96658dcd2..05a82212c064 100644 --- a/include/comphelper/interfacecontainer3.hxx +++ b/include/comphelper/interfacecontainer3.hxx @@ -314,7 +314,7 @@ OInterfaceContainerHelper3<ListenerT>::addInterface(const css::uno::Reference<Li osl::MutexGuard aGuard(mrMutex); maData->push_back(rListener); - return maData->size(); + return std::as_const(maData)->size(); } template <class ListenerT> @@ -337,7 +337,7 @@ sal_Int32 OInterfaceContainerHelper3<ListenerT>::removeInterface( if (it != maData->end()) maData->erase(it); - return maData->size(); + return std::as_const(maData)->size(); } template <class ListenerT> diff --git a/include/comphelper/interfacecontainer4.hxx b/include/comphelper/interfacecontainer4.hxx index 1362ee1df741..a8b2bdc85505 100644 --- a/include/comphelper/interfacecontainer4.hxx +++ b/include/comphelper/interfacecontainer4.hxx @@ -353,7 +353,7 @@ OInterfaceContainerHelper4<ListenerT>::addInterface(std::unique_lock<std::mutex> (void)rGuard; assert(rListener.is()); maData->push_back(rListener); - return maData->size(); + return std::as_const(maData)->size(); } template <class ListenerT> @@ -377,7 +377,7 @@ sal_Int32 OInterfaceContainerHelper4<ListenerT>::removeInterface( if (it != maData->end()) maData->erase(it); - return maData->size(); + return std::as_const(maData)->size(); } template <class ListenerT> |