aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schickel2010-01-05 22:01:05 +0000
committerJohannes Schickel2010-01-05 22:01:05 +0000
commit7591a09365c9a4cb93fa13c54ae067a90cd02738 (patch)
treed472320d595b8250cf2411465e0cac648d8b5e0a
parent664ace90e7e735ff33142664f9c1d3424f8383b2 (diff)
downloadscummvm-rg350-7591a09365c9a4cb93fa13c54ae067a90cd02738.tar.gz
scummvm-rg350-7591a09365c9a4cb93fa13c54ae067a90cd02738.tar.bz2
scummvm-rg350-7591a09365c9a4cb93fa13c54ae067a90cd02738.zip
Implement Timestamp::operator== as equality in time.
svn-id: r47054
-rw-r--r--sound/timestamp.cpp7
1 files 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 {