[WTF] Add a multiplication operator (and a few others) to MediaTime
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 23 Oct 2013 00:18:16 +0000 (00:18 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 23 Oct 2013 00:18:16 +0000 (00:18 +0000)
commitb3210c57756baa6e379f858c42a05c181c5e93c1
tree0a9b8ad6e862bd7216f559eb3bfe4cc6f31168c5
parent6e8ba551d8b6f18873ae4882b814fc614190cef9
[WTF] Add a multiplication operator (and a few others) to MediaTime
https://bugs.webkit.org/show_bug.cgi?id=123137

Reviewed by Eric Carlson.

Source/WTF:

Add a multiplication operator and an inequality operator to the
MediaTime class for use by MSE.

* wtf/MediaTime.cpp:
(WTF::signum): Moved to top of file.
(WTF::MediaTime::operator*): Added.
(WTF::MediaTime::operator!=): Added.
* wtf/MediaTime.h:
(WTF::operator*): Added non-class version of operator*.

Tools:

Add tests for new MediaTime operators.

* TestWebKitAPI/Tests/WTF/MediaTime.cpp:
(TestWebKitAPI::TEST):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@157835 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WTF/ChangeLog
Source/WTF/wtf/MediaTime.cpp
Source/WTF/wtf/MediaTime.h
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WTF/MediaTime.cpp