mirror of
https://github.com/nasa/trick.git
synced 2024-12-20 05:37:55 +00:00
Changed not to inherit from binary_function for c++11 or above. (#1607)
This commit is contained in:
parent
2c27b65e14
commit
260b5fa558
@ -4,6 +4,7 @@
|
|||||||
PURPOSE: ( Event Class )
|
PURPOSE: ( Event Class )
|
||||||
*/
|
*/
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <iostream>
|
||||||
#include "trick/mm_macros.hh"
|
#include "trick/mm_macros.hh"
|
||||||
#include "trick/exec_proto.h"
|
#include "trick/exec_proto.h"
|
||||||
|
|
||||||
@ -203,12 +204,16 @@ class Event {
|
|||||||
|
|
||||||
|
|
||||||
#ifndef SWIG
|
#ifndef SWIG
|
||||||
struct CompareEventPtrs : public std::binary_function<Trick::Event *, Trick::Event *, bool> {
|
// No need to inherit from binary_function for c++11 or later
|
||||||
|
#if __cplusplus >= 201103L
|
||||||
|
struct CompareEventPtrs {
|
||||||
|
#else
|
||||||
|
struct CompareEventPtrs : public std::binary_function<Trick::Event *, Trick::Event *, bool> {
|
||||||
|
#endif
|
||||||
bool operator()(const Trick::Event * lhs, const Trick::Event * rhs) const {
|
bool operator()(const Trick::Event * lhs, const Trick::Event * rhs) const {
|
||||||
return lhs->get_next_tics() < rhs->get_next_tics();
|
return lhs->get_next_tics() < rhs->get_next_tics();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user