return false;
if (nUnits < 0 || nUnits > COIN)
return false;
- int64_t nWhole = atoi64(strWhole);
+ int64_t nWhole = strtoll(strWhole);
int64_t nValue = nWhole*COIN + nUnits;
nRet = nValue;
int64_t GetArg(const string& strArg, int64_t nDefault)
{
if (mapArgs.count(strArg))
- return atoi64(mapArgs[strArg]);
+ return strtoll(mapArgs[strArg]);
return nDefault;
}
return strprintf("%d", n);
}
-inline int64_t atoi64(const char* psz)
+inline int64_t strtoll(const char* psz)
{
-#ifdef _MSC_VER
- return _atoi64(psz);
-#else
return strtoll(psz, NULL, 10);
-#endif
}
-inline int64_t atoi64(const std::string& str)
+inline int64_t strtoll(const std::string& str)
{
-#ifdef _MSC_VER
- return _atoi64(str.c_str());
-#else
return strtoll(str.c_str(), NULL, 10);
-#endif
}
inline int32_t strtol(const char* psz)
nOrderPos = -1; // TODO: calculate elsewhere
return;
}
- nOrderPos = atoi64(mapValue["n"].c_str());
+ nOrderPos = strtoll(mapValue["n"]);
}
ReadOrderPos(pthis->nOrderPos, pthis->mapValue);
- pthis->nTimeSmart = mapValue.count("timesmart") ? (unsigned int)atoi64(pthis->mapValue["timesmart"]) : 0;
+ pthis->nTimeSmart = mapValue.count("timesmart") ? (unsigned int)strtoll(pthis->mapValue["timesmart"]) : 0;
}
pthis->mapValue.erase("fromaccount");