Fix C++17 compilation warning

This commit is contained in:
Bruno Herbelin
2022-12-04 13:17:51 +01:00
parent 36bc4944f9
commit e08b6ade9e
5 changed files with 9 additions and 9 deletions

View File

@@ -149,7 +149,7 @@ ConnectionInfo Connection::info(int index)
} }
struct hasName: public std::unary_function<ConnectionInfo, bool> struct hasName
{ {
inline bool operator()(const ConnectionInfo &elem) const { inline bool operator()(const ConnectionInfo &elem) const {
return (elem.name.compare(_a) == 0); return (elem.name.compare(_a) == 0);

View File

@@ -84,7 +84,7 @@ bool FrameGrabbing::busy() const
return !grabbers_.empty(); return !grabbers_.empty();
} }
struct fgId: public std::unary_function<FrameGrabber*, bool> struct fgId
{ {
inline bool operator()(const FrameGrabber* elem) const { inline bool operator()(const FrameGrabber* elem) const {
return (elem && elem->id() == _id); return (elem && elem->id() == _id);

View File

@@ -132,9 +132,9 @@ typedef std::multiset<Node*, z_comparator> NodeSet;
//typedef std::list<Node*> NodeSet; //typedef std::list<Node*> NodeSet;
struct hasId: public std::unary_function<Node*, bool> struct hasId
{ {
inline bool operator()(const Node* e) const constexpr bool operator()(const Node* e) const
{ {
return (e && e->id() == _id); return (e && e->id() == _id);
} }

View File

@@ -200,7 +200,7 @@ public:
MixingGroup *mixingGroup() const { return mixinggroup_; } MixingGroup *mixingGroup() const { return mixinggroup_; }
void clearMixingGroup(); void clearMixingGroup();
struct hasNode: public std::unary_function<Source*, bool> struct hasNode
{ {
bool operator()(const Source* elem) const; bool operator()(const Source* elem) const;
hasNode(Node *n) : _n(n) { } hasNode(Node *n) : _n(n) { }
@@ -208,7 +208,7 @@ public:
Node *_n; Node *_n;
}; };
struct hasName: public std::unary_function<Source*, bool> struct hasName
{ {
inline bool operator()(const Source* elem) const { inline bool operator()(const Source* elem) const {
return (elem && elem->name() == _n); return (elem && elem->name() == _n);
@@ -218,7 +218,7 @@ public:
std::string _n; std::string _n;
}; };
struct hasId: public std::unary_function<Source*, bool> struct hasId
{ {
inline bool operator()(const Source* elem) const { inline bool operator()(const Source* elem) const {
return (elem && elem->id() == _id); return (elem && elem->id() == _id);
@@ -228,7 +228,7 @@ public:
uint64_t _id; uint64_t _id;
}; };
struct hasDepth: public std::unary_function<Source*, bool> struct hasDepth
{ {
inline bool operator()(const Source* elem) const { inline bool operator()(const Source* elem) const {
return (elem && elem->depth()>_from && elem->depth()<_to ); return (elem && elem->depth()>_from && elem->depth()<_to );

View File

@@ -28,7 +28,7 @@
static float empty_zeros[MAX_TIMELINE_ARRAY] = {}; static float empty_zeros[MAX_TIMELINE_ARRAY] = {};
static float empty_ones[MAX_TIMELINE_ARRAY] = {}; static float empty_ones[MAX_TIMELINE_ARRAY] = {};
struct includesTime: public std::unary_function<TimeInterval, bool> struct includesTime
{ {
inline bool operator()(const TimeInterval s) const inline bool operator()(const TimeInterval s) const
{ {