Hopefully fix compile on some unknown compiler. (nw)

This commit is contained in:
couriersud 2017-01-26 11:03:02 +01:00
parent c4dbd26730
commit 716361fd6a

View File

@ -8,6 +8,7 @@
#include <cstring>
#include <algorithm>
#include <stack>
#include <cstdlib>
#include "pstring.h"
#include "palloc.h"
@ -238,7 +239,7 @@ double pstring_t<F>::as_double(bool *error) const
if (error != nullptr)
*error = false;
ret = strtod(c_str(), &e);
ret = std::strtod(c_str(), &e);
if (*e != 0)
if (error != nullptr)
*error = true;
@ -254,9 +255,9 @@ long pstring_t<F>::as_long(bool *error) const
if (error != nullptr)
*error = false;
if (startsWith("0x"))
ret = strtol(substr(2).c_str(), &e, 16);
ret = std::strtol(substr(2).c_str(), &e, 16);
else
ret = strtol(c_str(), &e, 10);
ret = std::strtol(c_str(), &e, 10);
if (*e != 0)
if (error != nullptr)
*error = true;