From a54b8ab06b8cb5880ff87ab431dbb41c0910c89d Mon Sep 17 00:00:00 2001 From: Matteo Cypriani Date: Tue, 26 Apr 2011 14:14:01 +0200 Subject: [PATCH] [Positioning] Timestamp: update operator bool() Test tv_sec and tv_usec independently instead of using operator uint64_t(). --- owlps-positioning/src/timestamp.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/owlps-positioning/src/timestamp.hh b/owlps-positioning/src/timestamp.hh index d1a8e5b..de2ae8e 100644 --- a/owlps-positioning/src/timestamp.hh +++ b/owlps-positioning/src/timestamp.hh @@ -228,7 +228,7 @@ inline bool Timestamp::operator>=(const uint64_t source) const inline Timestamp::operator bool() const { - return static_cast(*this) > 0 ; + return timestamp.tv_sec > 0 || timestamp.tv_nsec > 0 ; }