Przeglądaj źródła

Urk, forgot to build this one after merging and goofed a bit.

Uli Kusterer 12 lat temu
rodzic
commit
35ce309f73
2 zmienionych plików z 14 dodań i 20 usunięć
  1. 9 1
      tinyxml2.cpp
  2. 5 19
      tinyxml2.h

+ 9 - 1
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 );

+ 5 - 19
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