std::ptr_fun became deprecated since C++11

Change-Id: If93609d032c9864e0251230bf9ed76e6b6741a62
Reviewed-on: https://gerrit.libreoffice.org/15672
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
Takeshi Abe
2015-05-08 17:29:01 +09:00
committed by Caolán McNamara
parent 12bb6a054d
commit 99e60d8d62
4 changed files with 13 additions and 15 deletions

View File

@@ -235,7 +235,7 @@ namespace dxcanvas
mpBackBuffer->draw(aUpdateArea); mpBackBuffer->draw(aUpdateArea);
// redraw sprites // redraw sprites
mpRedrawManager->forEachSprite(::std::ptr_fun( &spriteRedraw ) ); mpRedrawManager->forEachSprite( &spriteRedraw );
// flip primary surface to screen // flip primary surface to screen
// ============================== // ==============================
@@ -290,7 +290,7 @@ namespace dxcanvas
// are avoided. // are avoided.
::std::for_each( rUpdateArea.maComponentList.begin(), ::std::for_each( rUpdateArea.maComponentList.begin(),
rUpdateArea.maComponentList.end(), rUpdateArea.maComponentList.end(),
::std::ptr_fun( &spriteRedrawStub2 ) ); &spriteRedrawStub2 );
// repaint uncovered areas from backbuffer - take the // repaint uncovered areas from backbuffer - take the
// _rounded_ rectangles from above, to have the update // _rounded_ rectangles from above, to have the update
@@ -328,7 +328,7 @@ namespace dxcanvas
// buffer. // buffer.
::std::for_each( rSortedUpdateSprites.begin(), ::std::for_each( rSortedUpdateSprites.begin(),
rSortedUpdateSprites.end(), rSortedUpdateSprites.end(),
::std::ptr_fun( &spriteRedrawStub ) ); &spriteRedrawStub );
// TODO(E1): Use numeric_cast to catch overflow here // TODO(E1): Use numeric_cast to catch overflow here
::basegfx::B2IRange aActualArea( 0, 0, ::basegfx::B2IRange aActualArea( 0, 0,
@@ -364,7 +364,7 @@ namespace dxcanvas
::std::for_each( rSortedUpdateSprites.begin(), ::std::for_each( rSortedUpdateSprites.begin(),
rSortedUpdateSprites.end(), rSortedUpdateSprites.end(),
::std::ptr_fun( &spriteRedrawStub ) ); &spriteRedrawStub );
// add given update area to the 'blit to foreground' rect // add given update area to the 'blit to foreground' rect
maUpdateRect.expand( aActualArea ); maUpdateRect.expand( aActualArea );

View File

@@ -712,13 +712,13 @@ void Binding::valueModified()
Reference<XInterface> xSource = static_cast<XPropertySet*>( this ); Reference<XInterface> xSource = static_cast<XPropertySet*>( this );
::std::for_each( maModifyListeners.begin(), ::std::for_each( maModifyListeners.begin(),
maModifyListeners.end(), maModifyListeners.end(),
::std::bind2nd( ::std::ptr_fun( lcl_modified ), xSource ) ); ::std::bind( lcl_modified, std::placeholders::_1, xSource ) );
::std::for_each( maListEntryListeners.begin(), ::std::for_each( maListEntryListeners.begin(),
maListEntryListeners.end(), maListEntryListeners.end(),
::std::bind2nd( ::std::ptr_fun( lcl_listentry ), xSource ) ); ::std::bind( lcl_listentry, std::placeholders::_1, xSource ) );
::std::for_each( maValidityListeners.begin(), ::std::for_each( maValidityListeners.begin(),
maValidityListeners.end(), maValidityListeners.end(),
::std::bind2nd( ::std::ptr_fun( lcl_validate ), xSource ) ); ::std::bind( lcl_validate, std::placeholders::_1, xSource ) );
// now distribute MIPs to children // now distribute MIPs to children
if( xNode.is() ) if( xNode.is() )

View File

@@ -136,7 +136,7 @@ javaFrameworkError SAL_CALL jfw_findAllJREs(JavaInfo ***pparInfo, sal_Int32 *pSi
//the same JRE //the same JRE
it_info it_duplicate = it_info it_duplicate =
std::find_if(vecInfoManual.begin(), vecInfoManual.end(), std::find_if(vecInfoManual.begin(), vecInfoManual.end(),
std::bind2nd(std::ptr_fun(areEqualJavaInfo), aInfo)); std::bind(areEqualJavaInfo, std::placeholders::_1, aInfo));
if (it_duplicate == vecInfoManual.end()) if (it_duplicate == vecInfoManual.end())
vecInfoManual.push_back(aInfo); vecInfoManual.push_back(aInfo);
} }
@@ -165,7 +165,7 @@ javaFrameworkError SAL_CALL jfw_findAllJREs(JavaInfo ***pparInfo, sal_Int32 *pSi
{ {
it_info it_duplicate = it_info it_duplicate =
std::find_if(vecInfoManual2.begin(), vecInfoManual2.end(), std::find_if(vecInfoManual2.begin(), vecInfoManual2.end(),
std::bind2nd(std::ptr_fun(areEqualJavaInfo), *j)); std::bind(areEqualJavaInfo, std::placeholders::_1, *j));
if (it_duplicate != vecInfoManual2.end()) if (it_duplicate != vecInfoManual2.end())
vecInfoManual2.erase(it_duplicate); vecInfoManual2.erase(it_duplicate);
} }

View File

@@ -52,6 +52,7 @@
#include <xmloff/xmlnmspe.hxx> #include <xmloff/xmlnmspe.hxx>
#include <rtl/strbuf.hxx> #include <rtl/strbuf.hxx>
#include <algorithm> #include <algorithm>
#include <functional>
namespace xmloff namespace xmloff
{ {
@@ -581,18 +582,15 @@ void OFormLayerXMLImport_Impl::documentDone( )
// process XForms-bindings; call registerXFormsValueBinding for each // process XForms-bindings; call registerXFormsValueBinding for each
std::for_each( m_aXFormsValueBindings.begin(), std::for_each( m_aXFormsValueBindings.begin(),
m_aXFormsValueBindings.end(), m_aXFormsValueBindings.end(),
bind1st( ptr_fun( bindXFormsValueBinding ), std::bind( bindXFormsValueBinding, rImport.GetModel(), std::placeholders::_1 ) );
rImport.GetModel() ) );
// same for list bindings // same for list bindings
std::for_each( m_aXFormsListBindings.begin(), std::for_each( m_aXFormsListBindings.begin(),
m_aXFormsListBindings.end(), m_aXFormsListBindings.end(),
bind1st( ptr_fun( bindXFormsListBinding ), std::bind( bindXFormsListBinding, rImport.GetModel(), std::placeholders::_1 ) );
rImport.GetModel() ) );
// same for submissions // same for submissions
std::for_each( m_aXFormsSubmissions.begin(), std::for_each( m_aXFormsSubmissions.begin(),
m_aXFormsSubmissions.end(), m_aXFormsSubmissions.end(),
bind1st( ptr_fun( bindXFormsSubmission ), std::bind( bindXFormsSubmission, rImport.GetModel(), std::placeholders::_1 ) );
rImport.GetModel() ) );
} }
} // namespace xmloff } // namespace xmloff