From 0771e521bea04a25536120d00f987b5c491b2e6a Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Fri, 15 Apr 2016 11:24:35 +0200 Subject: Simplify getSubchannel by using lambda --- src/MuxElements.cpp | 2 +- src/MuxElements.h | 9 --------- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/src/MuxElements.cpp b/src/MuxElements.cpp index c02afcd..fd8d57a 100644 --- a/src/MuxElements.cpp +++ b/src/MuxElements.cpp @@ -207,7 +207,7 @@ vector::iterator getSubchannel( return find_if( subchannels.begin(), subchannels.end(), - bind2nd(SubchannelId(), id) + [&](const DabSubchannel* s){ return s->id == id; } ); } diff --git a/src/MuxElements.h b/src/MuxElements.h index 7f48827..289c35a 100644 --- a/src/MuxElements.h +++ b/src/MuxElements.h @@ -280,15 +280,6 @@ public: }; -class SubchannelId : public std::binary_function { -public: - bool operator()(const DabSubchannel* subchannel, const int id) const { - return subchannel->id == id; - } -}; - - - struct dabAudioComponent { dabAudioComponent() : -- cgit v1.2.3