From 46fd80ef2d9be3be7ab361fa85fde98f900a39cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Sun, 14 Apr 2024 20:58:48 +0200 Subject: Fix compatibility with C++17. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko (cherry picked from commit 0bcb76d981bf8ebd8806d6ae73cdcb77b5f4a124) --- kig/modes/construct_mode.cpp | 4 ++-- kig/modes/linkslabel.cpp | 4 ++-- kig/modes/macro.cpp | 8 ++++---- kig/modes/normal.cpp | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) (limited to 'kig/modes') diff --git a/kig/modes/construct_mode.cpp b/kig/modes/construct_mode.cpp index cc07c78a..378fc999 100644 --- a/kig/modes/construct_mode.cpp +++ b/kig/modes/construct_mode.cpp @@ -423,7 +423,7 @@ void TestConstructMode::handlePrelim( const std::vector& os, cons { Args args; std::transform( os.begin(), os.end(), std::back_inserter( args ), - std::mem_fun( &ObjectCalcer::imp ) ); + std::mem_fn( &ObjectCalcer::imp ) ); // usetext TQString usetext = i18n( mtype->argsParser().usetext( args.back(), args ).c_str() ); @@ -554,7 +554,7 @@ TQString TestConstructMode::selectStatement( const std::vector& s { using namespace std; Args args; - transform( sel.begin(), sel.end(), back_inserter( args ), mem_fun( &ObjectCalcer::imp ) ); + transform( sel.begin(), sel.end(), back_inserter( args ), mem_fn( &ObjectCalcer::imp ) ); std::string ret = mtype->argsParser().selectStatement( args ); if ( ret.empty() ) return TQString(); diff --git a/kig/modes/linkslabel.cpp b/kig/modes/linkslabel.cpp index a9d0fa59..19cb744d 100644 --- a/kig/modes/linkslabel.cpp +++ b/kig/modes/linkslabel.cpp @@ -129,6 +129,6 @@ void LinksLabel::applyEdit( LinksLabelEditBuf& buf ) p->layout->activate(); - std::for_each( p->urllabels.begin(), p->urllabels.end(), mem_fun( &TQWidget::show ) ); - std::for_each( p->labels.begin(), p->labels.end(), mem_fun( &TQWidget::show ) ); + std::for_each( p->urllabels.begin(), p->urllabels.end(), mem_fn( &TQWidget::show ) ); + std::for_each( p->labels.begin(), p->labels.end(), mem_fn( &TQWidget::show ) ); } diff --git a/kig/modes/macro.cpp b/kig/modes/macro.cpp index 35315b26..be69d80b 100644 --- a/kig/modes/macro.cpp +++ b/kig/modes/macro.cpp @@ -94,11 +94,11 @@ void DefineMacroMode::namePageEntered() std::vector given; std::transform( mgiven.begin(), mgiven.end(), std::back_inserter( given ), - std::mem_fun( memfun ) ); + std::mem_fn( memfun ) ); std::vector final; std::transform( mfinal.begin(), mfinal.end(), std::back_inserter( final ), - std::mem_fun( memfun ) ); + std::mem_fn( memfun ) ); ObjectHierarchy hier( given, final ); if ( hier.resultDoesNotDependOnGiven() ) { @@ -132,11 +132,11 @@ void DefineMacroMode::finishPressed() std::vector given; std::transform( mgiven.begin(), mgiven.end(), std::back_inserter( given ), - std::mem_fun( memfun ) ); + std::mem_fn( memfun ) ); std::vector final; std::transform( mfinal.begin(), mfinal.end(), std::back_inserter( final ), - std::mem_fun( memfun ) ); + std::mem_fn( memfun ) ); ObjectHierarchy hier( given, final ); MacroConstructor* ctor = new MacroConstructor( hier, diff --git a/kig/modes/normal.cpp b/kig/modes/normal.cpp index 2ca6f8b0..b91db417 100644 --- a/kig/modes/normal.cpp +++ b/kig/modes/normal.cpp @@ -71,8 +71,8 @@ void NormalMode::selectObjects( const std::vector& os ) { // hehe, don't you love this c++ stuff ;) std::for_each( os.begin(), os.end(), - std::bind1st( - std::mem_fun( &NormalMode::selectObject ), this ) ); + std::bind( + std::mem_fn( &NormalMode::selectObject ), this, std::placeholders::_1 ) ); } void NormalMode::unselectObject( ObjectHolder* o ) -- cgit v1.2.1