cppuhelper: add m_ prefix to OInterfaceIteratorHelper4 for member variable

Signed-off-by: Henry Castro <hcastro@collabora.com>
Change-Id: I7772c875ea77f942ca55dbe9551df19c2767a5ab
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186044
Tested-by: Jenkins
This commit is contained in:
Henry Castro
2025-05-30 08:59:24 -04:00
parent a6eb3588d9
commit 1b05e253fc

View File

@ -67,17 +67,17 @@ public:
*/ */
OInterfaceIteratorHelper4(std::unique_lock<std::mutex>& rGuard, OInterfaceIteratorHelper4(std::unique_lock<std::mutex>& rGuard,
OInterfaceContainerHelper4<ListenerT>& rCont_) OInterfaceContainerHelper4<ListenerT>& rCont_)
: rCont(rCont_) : m_rCont(rCont_)
, maData(rCont.maData) , m_aData(m_rCont.maData)
// const_cast so we don't trigger make_unique via o3tl::cow_wrapper::operator-> // const_cast so we don't trigger make_unique via o3tl::cow_wrapper::operator->
, nRemain(std::as_const(maData)->size()) , m_nRemain(std::as_const(m_aData)->size())
{ {
assert(rGuard.owns_lock()); assert(rGuard.owns_lock());
(void)rGuard; (void)rGuard;
} }
/** Return true, if there are more elements in the iterator. */ /** Return true, if there are more elements in the iterator. */
bool hasMoreElements() const { return nRemain != 0; } bool hasMoreElements() const { return m_nRemain != 0; }
/** Return the next element of the iterator. Calling this method if /** Return the next element of the iterator. Calling this method if
hasMoreElements() has returned false, is an error. hasMoreElements() has returned false, is an error.
*/ */
@ -93,11 +93,11 @@ public:
void remove(::std::unique_lock<::std::mutex>& rGuard); void remove(::std::unique_lock<::std::mutex>& rGuard);
private: private:
OInterfaceContainerHelper4<ListenerT>& rCont; OInterfaceContainerHelper4<ListenerT>& m_rCont;
o3tl::cow_wrapper<std::vector<css::uno::Reference<ListenerT>>, o3tl::cow_wrapper<std::vector<css::uno::Reference<ListenerT>>,
o3tl::ThreadSafeRefCountingPolicy> o3tl::ThreadSafeRefCountingPolicy>
maData; m_aData;
sal_Int32 nRemain; sal_Int32 m_nRemain;
OInterfaceIteratorHelper4(const OInterfaceIteratorHelper4&) = delete; OInterfaceIteratorHelper4(const OInterfaceIteratorHelper4&) = delete;
OInterfaceIteratorHelper4& operator=(const OInterfaceIteratorHelper4&) = delete; OInterfaceIteratorHelper4& operator=(const OInterfaceIteratorHelper4&) = delete;
@ -106,14 +106,14 @@ private:
template <class ListenerT> template <class ListenerT>
const css::uno::Reference<ListenerT>& OInterfaceIteratorHelper4<ListenerT>::next() const css::uno::Reference<ListenerT>& OInterfaceIteratorHelper4<ListenerT>::next()
{ {
nRemain--; m_nRemain--;
return (*std::as_const(maData))[nRemain]; return (*std::as_const(m_aData))[m_nRemain];
} }
template <class ListenerT> template <class ListenerT>
void OInterfaceIteratorHelper4<ListenerT>::remove(::std::unique_lock<::std::mutex>& rGuard) void OInterfaceIteratorHelper4<ListenerT>::remove(::std::unique_lock<::std::mutex>& rGuard)
{ {
rCont.removeInterface(rGuard, (*std::as_const(maData))[nRemain]); m_rCont.removeInterface(rGuard, (*std::as_const(m_aData))[m_nRemain]);
} }
/** /**