include/salhelper/singletonref.hxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
New commits: commit 6ebc026e34d0c119067e7dfbad8d932f92844760 Author: Stephan Bergmann <sberg...@redhat.com> Date: Wed Jun 27 08:33:50 2018 +0200 salhelper::SingletonRef copy ctor is broken, mark as deleted If that (implicitly defined) ctor had ever been used, it would have failed to increment m_nRef, so could have caused m_pInstance to be deleted too early. So better mark it as deleted. (LO itself apparently didn't call it. If 3rd party code would want to call it after all, it could be changed from deleted to properly user-provided, incrementing m_nRef, in the future.) The implicitly defined copy assignment op happens to already do the right thing, and /is/ used, e.g., during > m_aNode = _rhs.m_aNode; in DriversConfig::operator= (connectivity/source/commontools/DriversConfig.cxx). Mark it as defaulted to avoid -Wdeprecated-copy with GCC trunk towards GCC 9. Change-Id: I527123d9de837c311d30a270feb09dc173d9f411 Reviewed-on: https://gerrit.libreoffice.org/56512 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sberg...@redhat.com> diff --git a/include/salhelper/singletonref.hxx b/include/salhelper/singletonref.hxx index 45f685835d54..9d9747ee70ae 100644 --- a/include/salhelper/singletonref.hxx +++ b/include/salhelper/singletonref.hxx @@ -131,6 +131,9 @@ class SingletonRef // <- GLOBAL SAFE } +#if defined LIBO_INTERNAL_ONLY + SingletonRef & operator =(SingletonRef const &) = default; +#endif /** @short Allows rSingle->someBodyOp(). */ @@ -157,7 +160,7 @@ class SingletonRef // helper private: - + SingletonRef(SingletonRef &) SAL_DELETED_FUNCTION; /** @short creates an own mutex for guarding static contents. _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits