Commit 078bb0b9 authored by Oliver Kuckertz's avatar Oliver Kuckertz

Replace std::strtod by strtod

parent 00cc2652
...@@ -20,9 +20,9 @@ ...@@ -20,9 +20,9 @@
// THE SOFTWARE. // THE SOFTWARE.
#include "json.h" #include "json.h"
#include <math.h> // for HUGEVAL to check for overflow in std::strtod #include <math.h> // for HUGEVAL to check for overflow in strtod
#include <cstdlib> // std::strtod #include <stdlib.h> // strtod
#include <errno.h> // for std::strtod errors #include <errno.h> // for strtod errors
#include <unordered_map> #include <unordered_map>
#include <capnp/orphan.h> #include <capnp/orphan.h>
#include <kj/debug.h> #include <kj/debug.h>
...@@ -518,7 +518,7 @@ public: ...@@ -518,7 +518,7 @@ public:
char *endPtr; char *endPtr;
errno = 0; errno = 0;
double value = std::strtod(numberStr.begin(), &endPtr); double value = strtod(numberStr.begin(), &endPtr);
KJ_ASSERT(endPtr != numberStr.begin(), "strtod should not fail! Is consumeNumber wrong?"); KJ_ASSERT(endPtr != numberStr.begin(), "strtod should not fail! Is consumeNumber wrong?");
KJ_REQUIRE((value != HUGE_VAL && value != -HUGE_VAL) || errno != ERANGE, KJ_REQUIRE((value != HUGE_VAL && value != -HUGE_VAL) || errno != ERANGE,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment