Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(97)

Unified Diff: src/conversions-inl.h

Issue 14362023: Replace math.h with cmath (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: updates Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/conversions.cc ('k') | src/dtoa.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/conversions-inl.h
diff --git a/src/conversions-inl.h b/src/conversions-inl.h
index eb718d684dfa4de811f93e6d4ae62329705a59c8..595ae9ed5b3401bb9b0eea8f3576869fdcd39e92 100644
--- a/src/conversions-inl.h
+++ b/src/conversions-inl.h
@@ -29,9 +29,9 @@
#define V8_CONVERSIONS_INL_H_
#include <limits.h> // Required for INT_MAX etc.
-#include <math.h>
#include <float.h> // Required for DBL_MAX and on Win32 for finite()
#include <stdarg.h>
+#include <cmath>
#include "globals.h" // Required for V8_INFINITY
// ----------------------------------------------------------------------------
@@ -86,8 +86,8 @@ inline unsigned int FastD2UI(double x) {
inline double DoubleToInteger(double x) {
- if (isnan(x)) return 0;
- if (!isfinite(x) || x == 0) return x;
+ if (std::isnan(x)) return 0;
+ if (!std::isfinite(x) || x == 0) return x;
return (x >= 0) ? floor(x) : ceil(x);
}
« no previous file with comments | « src/conversions.cc ('k') | src/dtoa.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698