diff --git a/traffxml/traff_model.cpp b/traffxml/traff_model.cpp index ec981e489..e7cd9a515 100644 --- a/traffxml/traff_model.cpp +++ b/traffxml/traff_model.cpp @@ -145,16 +145,16 @@ bool IsoTime::IsPast() return t_tm < t_now; } -bool operator< (IsoTime lhs, IsoTime rhs) +bool IsoTime::operator< (IsoTime & rhs) { - std::time_t t_lhs = std::mktime(&lhs.m_tm); + std::time_t t_lhs = std::mktime(&m_tm); std::time_t t_rhs = std::mktime(&rhs.m_tm); return t_lhs < t_rhs; } -bool operator> (IsoTime lhs, IsoTime rhs) +bool IsoTime::operator> (IsoTime & rhs) { - std::time_t t_lhs = std::mktime(&lhs.m_tm); + std::time_t t_lhs = std::mktime(&m_tm); std::time_t t_rhs = std::mktime(&rhs.m_tm); return t_lhs > t_rhs; } diff --git a/traffxml/traff_model.hpp b/traffxml/traff_model.hpp index 0ab998e94..b73c28ce5 100644 --- a/traffxml/traff_model.hpp +++ b/traffxml/traff_model.hpp @@ -74,8 +74,8 @@ public: */ bool IsPast(); - friend bool operator< (IsoTime lhs, IsoTime rhs); - friend bool operator> (IsoTime lhs, IsoTime rhs); + bool operator< (IsoTime & rhs); + bool operator> (IsoTime & rhs); private: friend std::string DebugPrint(IsoTime time);