Closed
Bug 1351160
Opened 8 years ago
Closed 8 years ago
Footgun in multiplying a TimeUnit by a double
Categories
(Core :: Audio/Video: Playback, enhancement)
Core
Audio/Video: Playback
Tracking
()
RESOLVED
FIXED
mozilla55
Tracking | Status | |
---|---|---|
firefox55 | --- | fixed |
People
(Reporter: jwwang, Assigned: jwwang)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
media::TimeUnit t1 = media::TimeUnit::FromMicroseconds(100);
media::TimeUnit t2 = t1 * 0.99;
printf("t2=%lld\n", t2.ToMicroseconds());
It will print "t2=0" instead of "t2=99".
Comment hidden (mozreview-request) |
Assignee | ||
Updated•8 years ago
|
Attachment #8852338 -
Flags: review?(gsquelart)
Assignee: nobody → jwwang
Comment 2•8 years ago
|
||
mozreview-review |
Comment on attachment 8852338 [details]
Bug 1351160 - accept only integral types for operator*().
https://reviewboard.mozilla.org/r/124606/#review127116
Attachment #8852338 -
Flags: review?(gsquelart) → review+
Assignee | ||
Comment 3•8 years ago
|
||
Thanks!
Pushed by jwwang@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/06f369ba1d21
accept only integral types for operator*(). r=gerald
Comment 5•8 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox55:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in
before you can comment on or make changes to this bug.
Description
•