summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2018-01-19 21:00:16 +0100
committerMichael Stahl <mstahl@redhat.com>2018-01-22 09:32:52 +0100
commit0a0cf00b173d3207ae167b256e496d005615f1ee (patch)
tree3c3a9b12e6bdb8ef1e72a28e0a7bf517d2da7ec5 /sw
parent41abd684a6d1f3da71084fd854f66e22cb171b9d (diff)
C++17 deprecated std::shared_ptr::unique()
Most of these calls are in assertions, and the ones that aren't should be guarded by SolarMutex, so the thread safety concerns that caused unique() to be deprecated don't look relevant, so use use_count(), which oddly enough isn't deprecated. Change-Id: Ia166615af6c3ce85145c391752669c7461bd35fb Reviewed-on: https://gerrit.libreoffice.org/48222 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/doc/docbm.cxx2
-rw-r--r--sw/source/core/ole/ndole.cxx2
2 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx
index 87822dce5aa7..45618432f67d 100644
--- a/sw/source/core/doc/docbm.cxx
+++ b/sw/source/core/doc/docbm.cxx
@@ -994,7 +994,7 @@ namespace sw { namespace mark
for(iterator_t pBkmk = m_vAllMarks.begin();
pBkmk != m_vAllMarks.end();
++pBkmk)
- OSL_ENSURE( pBkmk->unique(),
+ OSL_ENSURE( pBkmk->use_count() == 1,
"<MarkManager::clearAllMarks(..)> - a Bookmark is still in use.");
#endif
m_vAllMarks.clear();
diff --git a/sw/source/core/ole/ndole.cxx b/sw/source/core/ole/ndole.cxx
index 7d91b8ce96d3..9960fd863f3c 100644
--- a/sw/source/core/ole/ndole.cxx
+++ b/sw/source/core/ole/ndole.cxx
@@ -1174,7 +1174,7 @@ void SwOLELRUCache::RemoveObj( SwOLEObj& rObj )
}
if (m_OleObjects.empty())
{
- if (g_pOLELRU_Cache.unique()) // test that we're not in InsertObj()
+ if (g_pOLELRU_Cache.use_count() == 1) // test that we're not in InsertObj()
{
g_pOLELRU_Cache.reset();
}