Jelajahi Sumber

Remove long long stuff again.

Uli Kusterer 12 tahun lalu
induk
melakukan
53fe47c74e
2 mengubah file dengan 0 tambahan dan 64 penghapusan
  1. 0 42
      tinyxml2.cpp
  2. 0 22
      tinyxml2.h

+ 0 - 42
tinyxml2.cpp

@@ -411,12 +411,6 @@ void XMLUtil::ToStr( int v, char* buffer, int bufferSize )
 }
 }
 
 
 
 
-void XMLUtil::ToStr( long long v, char* buffer, int bufferSize )
-{
-    TIXML_SNPRINTF( buffer, bufferSize, "%lld", v );
-}
-
-
 void XMLUtil::ToStr( unsigned v, char* buffer, int bufferSize )
 void XMLUtil::ToStr( unsigned v, char* buffer, int bufferSize )
 {
 {
     TIXML_SNPRINTF( buffer, bufferSize, "%u", v );
     TIXML_SNPRINTF( buffer, bufferSize, "%u", v );
@@ -452,13 +446,6 @@ bool XMLUtil::ToInt( const char* str, int* value )
     return false;
     return false;
 }
 }
 
 
-bool XMLUtil::ToLongLong( const char* str, long long* value )
-{
-    if ( TIXML_SSCANF( str, "%lld", value ) == 1 ) {
-        return true;
-    }
-    return false;
-}
 
 
 bool XMLUtil::ToUnsigned( const char* str, unsigned *value )
 bool XMLUtil::ToUnsigned( const char* str, unsigned *value )
 {
 {
@@ -1180,14 +1167,6 @@ void XMLAttribute::SetAttribute( int v )
 }
 }
 
 
 
 
-void XMLAttribute::SetAttribute( long long v )
-{
-    char buf[BUF_SIZE];
-    XMLUtil::ToStr( v, buf, BUF_SIZE );
-    _value.SetStr( buf );
-}
-
-
 void XMLAttribute::SetAttribute( unsigned v )
 void XMLAttribute::SetAttribute( unsigned v )
 {
 {
     char buf[BUF_SIZE];
     char buf[BUF_SIZE];
@@ -1333,14 +1312,6 @@ void XMLElement::SetText( double v )
 }
 }
 
 
 
 
-void XMLElement::SetText( long long v )
-{
-    char buf[BUF_SIZE];
-    XMLUtil::ToStr( v, buf, BUF_SIZE );
-    SetText( buf );
-}
-
-
 void	XMLElement::SetBoolFirstChild( bool inBool )
 void	XMLElement::SetBoolFirstChild( bool inBool )
 {
 {
 	if( FirstChild() && FirstChild()->ToElement()
 	if( FirstChild() && FirstChild()->ToElement()
@@ -1389,19 +1360,6 @@ XMLError XMLElement::QueryIntText( int* ival ) const
 }
 }
 
 
 
 
-XMLError XMLElement::QueryLongLongText( long long* ival ) const
-{
-    if ( FirstChild() && FirstChild()->ToText() ) {
-        const char* t = FirstChild()->ToText()->Value();
-        if ( XMLUtil::ToLongLong( t, ival ) ) {
-            return XML_SUCCESS;
-        }
-        return XML_CAN_NOT_CONVERT_TEXT;
-    }
-    return XML_NO_TEXT_NODE;
-}
-
-
 XMLError XMLElement::QueryUnsignedText( unsigned* uval ) const
 XMLError XMLElement::QueryUnsignedText( unsigned* uval ) const
 {
 {
     if ( FirstChild() && FirstChild()->ToText() ) {
     if ( FirstChild() && FirstChild()->ToText() ) {

+ 0 - 22
tinyxml2.h

@@ -540,7 +540,6 @@ public:
 
 
     // converts primitive types to strings
     // converts primitive types to strings
     static void ToStr( int v, char* buffer, int bufferSize );
     static void ToStr( int v, char* buffer, int bufferSize );
-    static void ToStr( long long v, char* buffer, int bufferSize );
     static void ToStr( unsigned v, char* buffer, int bufferSize );
     static void ToStr( unsigned v, char* buffer, int bufferSize );
     static void ToStr( bool v, char* buffer, int bufferSize );
     static void ToStr( bool v, char* buffer, int bufferSize );
     static void ToStr( float v, char* buffer, int bufferSize );
     static void ToStr( float v, char* buffer, int bufferSize );
@@ -548,7 +547,6 @@ public:
 
 
     // converts strings to primitive types
     // converts strings to primitive types
     static bool	ToInt( const char* str, int* value );
     static bool	ToInt( const char* str, int* value );
-    static bool	ToLongLong( const char* str, long long* value );
     static bool ToUnsigned( const char* str, unsigned* value );
     static bool ToUnsigned( const char* str, unsigned* value );
     static bool	ToBool( const char* str, bool* value );
     static bool	ToBool( const char* str, bool* value );
     static bool	ToFloat( const char* str, float* value );
     static bool	ToFloat( const char* str, float* value );
@@ -1095,8 +1093,6 @@ public:
     /// Set the attribute to value.
     /// Set the attribute to value.
     void SetAttribute( int value );
     void SetAttribute( int value );
     /// Set the attribute to value.
     /// Set the attribute to value.
-    void SetAttribute( long long value );
-    /// Set the attribute to value.
     void SetAttribute( unsigned value );
     void SetAttribute( unsigned value );
     /// Set the attribute to value.
     /// Set the attribute to value.
     void SetAttribute( bool value );
     void SetAttribute( bool value );
@@ -1312,11 +1308,6 @@ public:
         a->SetAttribute( value );
         a->SetAttribute( value );
     }
     }
     /// Sets the named attribute to value.
     /// Sets the named attribute to value.
-    void SetAttribute( const char* name, long long value )			{
-        XMLAttribute* a = FindOrCreateAttribute( name );
-        a->SetAttribute( value );
-    }
-    /// Sets the named attribute to value.
     void SetAttribute( const char* name, unsigned value )		{
     void SetAttribute( const char* name, unsigned value )		{
         XMLAttribute* a = FindOrCreateAttribute( name );
         XMLAttribute* a = FindOrCreateAttribute( name );
         a->SetAttribute( value );
         a->SetAttribute( value );
@@ -1425,9 +1416,6 @@ public:
     /// Convenience 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 );  
     void SetText( float value );  
 	
 	
-    /// Sets the text to the given long long.
-	void	SetText( long long inNum );
-	
 	/// Convenience for QueryIntText when you don't care if the text won't convert.
 	/// Convenience for QueryIntText when you don't care if the text won't convert.
 	int		IntText()
 	int		IntText()
 	{
 	{
@@ -1436,14 +1424,6 @@ public:
 		return i;
 		return i;
 	}
 	}
 
 
-	/// Convenience for QueryLongLongText when you don't care if the text won't convert.
-	long long		LongLongText()
-	{
-		long long		i = 0;
-		QueryLongLongText( &i );
-		return i;
-	}
-
 	/// Convenience for QueryUnsignedText when you don't care if the text won't convert.
 	/// Convenience for QueryUnsignedText when you don't care if the text won't convert.
 	unsigned	UnsignedText()
 	unsigned	UnsignedText()
 	{
 	{
@@ -1509,8 +1489,6 @@ public:
     */
     */
     XMLError QueryIntText( int* ival ) const;
     XMLError QueryIntText( int* ival ) const;
     /// See QueryIntText()
     /// See QueryIntText()
-    XMLError QueryLongLongText( long long* ival ) const;
-    /// See QueryIntText()
     XMLError QueryUnsignedText( unsigned* uval ) const;
     XMLError QueryUnsignedText( unsigned* uval ) const;
     /// See QueryIntText()
     /// See QueryIntText()
     XMLError QueryBoolText( bool* bval ) const;
     XMLError QueryBoolText( bool* bval ) const;