The default bug view has changed. See this FAQ.

Use cmath instead of math.h in nsMathUtils.h

RESOLVED FIXED in mozilla12

Status

()

Core
XPCOM
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: Joe Drew (not getting mail), Assigned: Joe Drew (not getting mail))

Tracking

Trunk
mozilla12
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

5 years ago
Created attachment 587476 [details] [diff] [review]
use cmath

If we manage to include <cmath> before including nsMathUtils.h, its usage of isfinite() breaks because isfinite only exists in the std:: namespace. We can work around this by explicitly using <cmath>'s version of the function.
Attachment #587476 - Flags: review?(bjacob)
(Assignee)

Comment 1

5 years ago
Created attachment 587503 [details] [diff] [review]
use cmath v2

We shouldnt do "using namespace std;" in a header. I'm going to run this through try, but it seems like all I need to worry about is std::isfinite on Darwin.
Attachment #587476 - Attachment is obsolete: true
Attachment #587476 - Flags: review?(bjacob)
Attachment #587503 - Flags: review?(bjacob)
Comment on attachment 587503 [details] [diff] [review]
use cmath v2

Review of attachment 587503 [details] [diff] [review]:
-----------------------------------------------------------------

r+ \o/ \o/ \o/
Attachment #587503 - Flags: review?(bjacob) → review+
(Assignee)

Comment 3

5 years ago
inbound: https://hg.mozilla.org/integration/mozilla-inbound/rev/53a8a6b4c812
https://hg.mozilla.org/mozilla-central/rev/53a8a6b4c812
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla12
You need to log in before you can comment on or make changes to this bug.