Merge pull request #43 from lioncash/str

DNAYaml: Replace implementation-specific functions with standardized equivalents
This commit is contained in:
Phillip Stephens 2019-08-15 08:39:32 -07:00 committed by GitHub
commit 97db908b3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 10 deletions

View File

@ -88,11 +88,7 @@ std::unique_ptr<YAMLNode> ValToNode(atUint32 val) {
template <> template <>
atInt64 NodeToVal(const YAMLNode* node) { atInt64 NodeToVal(const YAMLNode* node) {
#if _WIN32 return std::strtoll(node->m_scalarString.c_str(), nullptr, 0);
return _strtoi64(node->m_scalarString.c_str(), nullptr, 0);
#else
return strtoq(node->m_scalarString.c_str(), nullptr, 0);
#endif
} }
std::unique_ptr<YAMLNode> ValToNode(atInt64 val) { std::unique_ptr<YAMLNode> ValToNode(atInt64 val) {
@ -103,11 +99,7 @@ std::unique_ptr<YAMLNode> ValToNode(atInt64 val) {
template <> template <>
atUint64 NodeToVal(const YAMLNode* node) { atUint64 NodeToVal(const YAMLNode* node) {
#if _WIN32 return std::strtoull(node->m_scalarString.c_str(), nullptr, 0);
return _strtoui64(node->m_scalarString.c_str(), nullptr, 0);
#else
return strtouq(node->m_scalarString.c_str(), nullptr, 0);
#endif
} }
std::unique_ptr<YAMLNode> ValToNode(atUint64 val) { std::unique_ptr<YAMLNode> ValToNode(atUint64 val) {