Conflicts:
	tinyxml2.cpp
	xmltest.cpp
This commit is contained in:
Uli Kusterer
2014-01-25 03:12:21 +01:00
5 changed files with 57 additions and 103 deletions

View File

@@ -1293,71 +1293,46 @@ void XMLElement::SetText( const char* inText )
}
void XMLElement::SetText( int inNum )
void XMLElement::SetText( int v )
{
char buf[BUF_SIZE];
XMLUtil::ToStr( inNum, buf, BUF_SIZE );
if ( FirstChild() && FirstChild()->ToText() )
FirstChild()->SetValue( buf );
else {
XMLText* theText = GetDocument()->NewText( buf );
InsertFirstChild( theText );
}
XMLUtil::ToStr( v, buf, BUF_SIZE );
SetText( buf );
}
void XMLElement::SetText( unsigned inNum )
void XMLElement::SetText( unsigned v )
{
char buf[BUF_SIZE];
XMLUtil::ToStr( inNum, buf, BUF_SIZE );
if ( FirstChild() && FirstChild()->ToText() )
FirstChild()->SetValue( buf );
else {
XMLText* theText = GetDocument()->NewText( buf );
InsertFirstChild( theText );
}
XMLUtil::ToStr( v, buf, BUF_SIZE );
SetText( buf );
}
void XMLElement::SetText( double inNum )
void XMLElement::SetText( bool v )
{
char buf[BUF_SIZE];
XMLUtil::ToStr( inNum, buf, BUF_SIZE );
if ( FirstChild() && FirstChild()->ToText() )
FirstChild()->SetValue( buf );
else {
XMLText* theText = GetDocument()->NewText( buf );
InsertFirstChild( theText );
}
XMLUtil::ToStr( v, buf, BUF_SIZE );
SetText( buf );
}
void XMLElement::SetText( float inNum )
void XMLElement::SetText( float v )
{
char buf[BUF_SIZE];
XMLUtil::ToStr( inNum, buf, BUF_SIZE );
if ( FirstChild() && FirstChild()->ToText() )
FirstChild()->SetValue( buf );
else {
XMLText* theText = GetDocument()->NewText( buf );
InsertFirstChild( theText );
}
XMLUtil::ToStr( v, buf, BUF_SIZE );
SetText( buf );
}
void XMLElement::SetText( long long inNum )
void XMLElement::SetText( double v )
{
char buf[BUF_SIZE];
XMLUtil::ToStr( inNum, buf, BUF_SIZE );
if ( FirstChild() && FirstChild()->ToText() )
FirstChild()->SetValue( buf );
else {
XMLText* theText = GetDocument()->NewText( buf );
InsertFirstChild( theText );
}
XMLUtil::ToStr( v, buf, BUF_SIZE );
SetText( buf );
}
void XMLElement::SetBoolFirstChild( bool inBool )
{
if( FirstChild() && FirstChild()->ToElement()