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)

enhancement
Not set
normal

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".
Blocks: 1245019
Attachment #8852338 - Flags: review?(gsquelart)
Assignee: nobody → jwwang
Attachment #8852338 - Flags: review?(gsquelart) → review+
Thanks!
Pushed by jwwang@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/06f369ba1d21 accept only integral types for operator*(). r=gerald
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: