diff --git a/src/Connection.cpp b/src/Connection.cpp index 2662720..1d21e3d 100644 --- a/src/Connection.cpp +++ b/src/Connection.cpp @@ -149,7 +149,7 @@ ConnectionInfo Connection::info(int index) } -struct hasName: public std::unary_function +struct hasName { inline bool operator()(const ConnectionInfo &elem) const { return (elem.name.compare(_a) == 0); diff --git a/src/FrameGrabber.cpp b/src/FrameGrabber.cpp index 3506eaa..8bad4a4 100644 --- a/src/FrameGrabber.cpp +++ b/src/FrameGrabber.cpp @@ -84,7 +84,7 @@ bool FrameGrabbing::busy() const return !grabbers_.empty(); } -struct fgId: public std::unary_function +struct fgId { inline bool operator()(const FrameGrabber* elem) const { return (elem && elem->id() == _id); diff --git a/src/Scene.h b/src/Scene.h index 19614d1..6275113 100644 --- a/src/Scene.h +++ b/src/Scene.h @@ -132,9 +132,9 @@ typedef std::multiset NodeSet; //typedef std::list NodeSet; -struct hasId: public std::unary_function +struct hasId { - inline bool operator()(const Node* e) const + constexpr bool operator()(const Node* e) const { return (e && e->id() == _id); } diff --git a/src/Source.h b/src/Source.h index c72599e..df3f579 100644 --- a/src/Source.h +++ b/src/Source.h @@ -200,7 +200,7 @@ public: MixingGroup *mixingGroup() const { return mixinggroup_; } void clearMixingGroup(); - struct hasNode: public std::unary_function + struct hasNode { bool operator()(const Source* elem) const; hasNode(Node *n) : _n(n) { } @@ -208,7 +208,7 @@ public: Node *_n; }; - struct hasName: public std::unary_function + struct hasName { inline bool operator()(const Source* elem) const { return (elem && elem->name() == _n); @@ -218,7 +218,7 @@ public: std::string _n; }; - struct hasId: public std::unary_function + struct hasId { inline bool operator()(const Source* elem) const { return (elem && elem->id() == _id); @@ -228,7 +228,7 @@ public: uint64_t _id; }; - struct hasDepth: public std::unary_function + struct hasDepth { inline bool operator()(const Source* elem) const { return (elem && elem->depth()>_from && elem->depth()<_to ); diff --git a/src/Timeline.cpp b/src/Timeline.cpp index b75c4c2..7c5a9aa 100644 --- a/src/Timeline.cpp +++ b/src/Timeline.cpp @@ -28,7 +28,7 @@ static float empty_zeros[MAX_TIMELINE_ARRAY] = {}; static float empty_ones[MAX_TIMELINE_ARRAY] = {}; -struct includesTime: public std::unary_function +struct includesTime { inline bool operator()(const TimeInterval s) const {