From 7591a09365c9a4cb93fa13c54ae067a90cd02738 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Tue, 5 Jan 2010 22:01:05 +0000 Subject: Implement Timestamp::operator== as equality in time. svn-id: r47054 --- sound/timestamp.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/sound/timestamp.cpp b/sound/timestamp.cpp index a517462bb4..ad13d75c9f 100644 --- a/sound/timestamp.cpp +++ b/sound/timestamp.cpp @@ -66,11 +66,8 @@ Timestamp Timestamp::convertToFramerate(int newFramerate) const { } bool Timestamp::operator==(const Timestamp &ts) const { - // TODO: Alternatively, we could define equality to mean that - // two timestamps describe the exacts same moment in time. - return (_msecs == ts._msecs) && - (_numberOfFrames == ts._numberOfFrames) && - (_framerate == ts._framerate); + // TODO: Improve this + return (ts.msecs() == msecs()) && !frameDiff(ts); } bool Timestamp::operator!=(const Timestamp &ts) const { -- cgit v1.2.3