try to fix the lld issue
diff --git a/tinyxml2.cpp b/tinyxml2.cpp
index d5d8ebb..9d6be5c 100755
--- a/tinyxml2.cpp
+++ b/tinyxml2.cpp
@@ -558,7 +558,8 @@
void XMLUtil::ToStr(int64_t v, char* buffer, int bufferSize)
{
- TIXML_SNPRINTF(buffer, bufferSize, "%lld", v);
+ // horrible syntax trick to make the compiler happy about %lld
+ TIXML_SNPRINTF(buffer, bufferSize, "%lld", (long long)v);
}
@@ -617,7 +618,9 @@
bool XMLUtil::ToInt64(const char* str, int64_t* value)
{
- if (TIXML_SSCANF(str, "%lld", value) == 1) {
+ long long v = 0; // horrible syntax trick to make the compiler happy about %lld
+ if (TIXML_SSCANF(str, "%lld", &v) == 1) {
+ *value = (int64_t)v;
return true;
}
return false;