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>
This commit is contained in:
Noel Grandin 2024-01-16 11:02:46 +02:00
parent 173b40944f
commit 5f9da6e0ee
4 changed files with 8 additions and 6 deletions

View file

@ -34,6 +34,8 @@ public:
{
}
bool shouldVisitTemplateInstantiations() const { return true; }
virtual bool preRun() override { return true; }
virtual void run() override

View file

@ -358,7 +358,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>
@ -382,7 +382,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>

View file

@ -318,7 +318,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>
@ -341,7 +341,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>

View file

@ -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>