From 35ce309f73472c723be6a19f69ba6cffcddbf622 Mon Sep 17 00:00:00 2001 From: Uli Kusterer Date: Sat, 25 Jan 2014 03:37:16 +0100 Subject: [PATCH] Urk, forgot to build this one after merging and goofed a bit. --- tinyxml2.cpp | 10 +++++++++- tinyxml2.h | 24 +++++------------------- 2 files changed, 14 insertions(+), 20 deletions(-) diff --git a/tinyxml2.cpp b/tinyxml2.cpp index 6081856..fe5b437 100755 --- a/tinyxml2.cpp +++ b/tinyxml2.cpp @@ -1325,7 +1325,15 @@ void XMLElement::SetText( float v ) } -void XMLElement::SetText( double v ) +void XMLElement::SetText( double v ) +{ + char buf[BUF_SIZE]; + XMLUtil::ToStr( v, buf, BUF_SIZE ); + SetText( buf ); +} + + +void XMLElement::SetText( long long v ) { char buf[BUF_SIZE]; XMLUtil::ToStr( v, buf, BUF_SIZE ); diff --git a/tinyxml2.h b/tinyxml2.h index f9269a1..734be7d 100755 --- a/tinyxml2.h +++ b/tinyxml2.h @@ -1414,28 +1414,16 @@ public: @endverbatim */ void SetText( const char* inText ); - /// Convenince method for setting text inside and element. See SetText() for important limitations. + /// Convenience method for setting text inside and element. See SetText() for important limitations. void SetText( int value ); - /// Convenince method for setting text inside and element. See SetText() for important limitations. + /// Convenience method for setting text inside and element. See SetText() for important limitations. void SetText( unsigned value ); - /// Convenince method for setting text inside and element. See SetText() for important limitations. + /// Convenience method for setting text inside and element. See SetText() for important limitations. void SetText( bool value ); - /// Convenince method for setting text inside and element. See SetText() for important limitations. + /// Convenience method for setting text inside and element. See SetText() for important limitations. void SetText( double value ); - /// Convenince method for setting text inside and element. See SetText() for important limitations. + /// Convenience method for setting text inside and element. See SetText() for important limitations. void SetText( float value ); - - /// Sets the text to the given number. - void SetText( int inNum ); - - /// Sets the text to the given number. - void SetText( unsigned inNum ); - - /// Sets the text to the given double. - void SetText( double inNum ); - - /// Sets the text to the given float. - void SetText( float inNum ); /// Sets the text to the given long long. void SetText( long long inNum ); @@ -1545,8 +1533,6 @@ public: virtual bool ShallowEqual( const XMLNode* compare ) const; private: - enum { BUF_SIZE = 200 }; - XMLElement( XMLDocument* doc ); virtual ~XMLElement(); XMLElement( const XMLElement& ); // not supported