From 1dbfe31858f040483a686115f4e2cf9b20531d9d Mon Sep 17 00:00:00 2001 From: cugone Date: Fri, 12 Apr 2019 17:33:49 -0500 Subject: [PATCH] Missing uint64_t XMLElement::Unsigned64Text(uint64_t defaultValue) implementation --- tinyxml2.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tinyxml2.cpp b/tinyxml2.cpp index 5a797fc..67eb00b 100755 --- a/tinyxml2.cpp +++ b/tinyxml2.cpp @@ -1714,7 +1714,8 @@ XMLError XMLElement::QueryInt64Text(int64_t* ival) const } -XMLError XMLElement::QueryUnsigned64Text(uint64_t* ival) const { +XMLError XMLElement::QueryUnsigned64Text(uint64_t* ival) const +{ if(FirstChild() && FirstChild()->ToText()) { const char* t = FirstChild()->Value(); if(XMLUtil::ToUnsigned64(t, ival)) { @@ -1785,6 +1786,13 @@ int64_t XMLElement::Int64Text(int64_t defaultValue) const return i; } +uint64_t XMLElement::Unsigned64Text(uint64_t defaultValue) const +{ + uint64_t i = defaultValue; + QueryUnsigned64Text(&i); + return i; +} + bool XMLElement::BoolText(bool defaultValue) const { bool b = defaultValue;