From 517b8037f8c9be93c578befd5b2c3458b3306bc6 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Thu, 28 Feb 2019 10:46:41 +0100 Subject: Use lambda instead of std::bind + wrapper function Change-Id: Id8912b8b1b454fbc6ef58ce4fc18a15e096e5cea Reviewed-on: https://gerrit.libreoffice.org/68494 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- sfx2/source/doc/sfxbasemodel.cxx | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'sfx2') diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx index 1bc11c4f00e1..efa1cc3695aa 100644 --- a/sfx2/source/doc/sfxbasemodel.cxx +++ b/sfx2/source/doc/sfxbasemodel.cxx @@ -1496,16 +1496,6 @@ sal_Bool SAL_CALL SfxBaseModel::isReadonly() return !m_pData->m_pObjectShell.is() || m_pData->m_pObjectShell->IsReadOnly(); } -/** - * Proxy around SfxObjectShell::Save_Impl(), as vcl::solarthread::syncExecute() - * does not seem to accept lambdas. - */ -static bool SaveImplStatic(SfxObjectShell* pThis, const SfxItemSet* pParams) -{ - return pThis->Save_Impl(pParams); -} - - // XStorable2 @@ -1596,7 +1586,7 @@ void SAL_CALL SfxBaseModel::storeSelf( const Sequence< beans::PropertyValue > m_pData->m_pObjectShell->GetMedium( )->SetInCheckIn( nSlotId == SID_CHECKIN ); if (bOnMainThread) bRet = vcl::solarthread::syncExecute( - std::bind(&SaveImplStatic, m_pData->m_pObjectShell.get(), pParams.get())); + [this, &pParams] { return m_pData->m_pObjectShell->Save_Impl(pParams.get()); }); else bRet = m_pData->m_pObjectShell->Save_Impl(pParams.get()); m_pData->m_pObjectShell->GetMedium( )->SetInCheckIn( nSlotId != SID_CHECKIN ); -- cgit