mirror of https://github.com/libAthena/athena.git
Make signed YAML values export decimal
This commit is contained in:
parent
fd84808762
commit
cecbcffd96
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue