chart2/source/controller/main/DrawCommandDispatch.cxx | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-)
New commits: commit 7191d6371002a881f541a9c352d2356b7b9935d0 Author: Jochen Nitschke <[email protected]> Date: Wed Jul 5 16:23:33 2017 +0200 tdf#108782 replace std::bind2nd with lambda and inline PropertyValueCompare functor Change-Id: Ie8fd33810f7897cad35a727286b546a17db43ab7 Reviewed-on: https://gerrit.libreoffice.org/39603 Tested-by: Jenkins <[email protected]> Reviewed-by: Jochen Nitschke <[email protected]> diff --git a/chart2/source/controller/main/DrawCommandDispatch.cxx b/chart2/source/controller/main/DrawCommandDispatch.cxx index 2fb5b4863051..cded08bb68c8 100644 --- a/chart2/source/controller/main/DrawCommandDispatch.cxx +++ b/chart2/source/controller/main/DrawCommandDispatch.cxx @@ -51,19 +51,6 @@ using namespace ::com::sun::star::frame; using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::Sequence; -namespace -{ - - // comparing two PropertyValue instances - struct PropertyValueCompare : public std::binary_function< beans::PropertyValue, OUString, bool > - { - bool operator() ( const beans::PropertyValue& rPropValue, const OUString& rName ) const - { - return rPropValue.Name.equals( rName ); - } - }; - -} // anonymous namespace namespace chart { @@ -372,8 +359,9 @@ void DrawCommandDispatch::execute( const OUString& rCommand, const Sequence< bea const OUString sKeyModifier( "KeyModifier" ); const beans::PropertyValue* pIter = rArgs.getConstArray(); const beans::PropertyValue* pEnd = pIter + rArgs.getLength(); - const beans::PropertyValue* pKeyModifier = std::find_if( - pIter, pEnd, std::bind2nd( PropertyValueCompare(), std::cref( sKeyModifier ) ) ); + const beans::PropertyValue* pKeyModifier = std::find_if(pIter, pEnd, + [&sKeyModifier](const beans::PropertyValue& lhs) + {return lhs.Name == sKeyModifier;} ); sal_Int16 nKeyModifier = 0; if ( pKeyModifier != pEnd && pKeyModifier && ( pKeyModifier->Value >>= nKeyModifier ) && nKeyModifier == KEY_MOD1 ) { _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
