Make signed YAML values export decimal

This commit is contained in:
Jack Andersen 2017-01-31 21:18:04 -10:00
parent fd84808762
commit cecbcffd96
1 changed files with 4 additions and 4 deletions

View File

@ -95,7 +95,7 @@ template <>
inline std::unique_ptr<YAMLNode> ValToNode(const atInt8& val)
{
char str[32];
snprintf(str, 32, "0x%02X", val);
snprintf(str, 32, "%d", int(val));
YAMLNode* ret = new YAMLNode(YAML_SCALAR_NODE);
ret->m_scalarString = str;
return std::unique_ptr<YAMLNode>(ret);
@ -127,7 +127,7 @@ template <>
inline std::unique_ptr<YAMLNode> ValToNode(const atInt16& val)
{
char str[32];
snprintf(str, 32, "0x%04X", val);
snprintf(str, 32, "%d", int(val));
YAMLNode* ret = new YAMLNode(YAML_SCALAR_NODE);
ret->m_scalarString = str;
return std::unique_ptr<YAMLNode>(ret);
@ -159,7 +159,7 @@ template <>
inline std::unique_ptr<YAMLNode> ValToNode(const atInt32& val)
{
char str[32];
snprintf(str, 32, "0x%08X", val);
snprintf(str, 32, "%d", int(val));
YAMLNode* ret = new YAMLNode(YAML_SCALAR_NODE);
ret->m_scalarString = str;
return std::unique_ptr<YAMLNode>(ret);
@ -195,7 +195,7 @@ template <>
inline std::unique_ptr<YAMLNode> ValToNode(const atInt64& val)
{
char str[32];
snprintf(str, 32, "0x%016" PRIX64, val);
snprintf(str, 32, "%" PRId64, val);
YAMLNode* ret = new YAMLNode(YAML_SCALAR_NODE);
ret->m_scalarString = str;
return std::unique_ptr<YAMLNode>(ret);