[Positioner] Timestamp: less/greater -> before/after

Renames less_than() and greater_than(), they become before() and
after().
This commit is contained in:
Matteo Cypriani 2012-06-08 12:05:32 +02:00
parent 57cdeeb360
commit ff5bab01cc
2 changed files with 9 additions and 9 deletions

View File

@ -148,7 +148,7 @@ bool Timestamp::equals(const uint64_t source) const
}
bool Timestamp::less_than(const struct timespec &source) const
bool Timestamp::before(const struct timespec &source) const
{
if (timestamp.tv_sec < source.tv_sec)
return true ;
@ -164,11 +164,11 @@ bool Timestamp::less_than(const struct timespec &source) const
}
bool Timestamp::greater_than(const struct timespec &source) const
bool Timestamp::after(const struct timespec &source) const
{
if (equals(source))
return false ;
return ! less_than(source) ;
return ! before(source) ;
}

View File

@ -39,8 +39,8 @@ protected:
bool equals(const struct timespec &source) const ;
/// Compares to a millisecond value (deprecated)
bool equals(const uint64_t source) const ;
bool less_than(const struct timespec &source) const ;
bool greater_than(const struct timespec &source) const ;
bool before(const struct timespec &source) const ;
bool after(const struct timespec &source) const ;
//@}
/** @name Operations */
@ -171,13 +171,13 @@ inline bool Timestamp::operator!=(const uint64_t source) const
inline bool Timestamp::operator<(const Timestamp &source) const
{
return less_than(source.timestamp) ;
return before(source.timestamp) ;
}
inline bool Timestamp::operator<(const struct timespec &source) const
{
return less_than(source) ;
return before(source) ;
}
@ -189,13 +189,13 @@ inline bool Timestamp::operator<(const uint64_t source) const
inline bool Timestamp::operator>(const Timestamp &source) const
{
return greater_than(source.timestamp) ;
return after(source.timestamp) ;
}
inline bool Timestamp::operator>(const struct timespec &source) const
{
return greater_than(source) ;
return after(source) ;
}