Closed Bug 717047 Opened 14 years ago Closed 14 years ago

Use cmath instead of math.h in nsMathUtils.h

Categories

(Core :: XPCOM, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla12

People

(Reporter: joe, Assigned: joe)

Details

Attachments

(1 file, 1 obsolete file)

Attached patch use cmath (obsolete) — Splinter Review
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)
Attached patch use cmath v2Splinter Review
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+
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla12
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: