Skip to content

Commit

Permalink
Update attribute handling to use int32_t and uint32_t types.
Browse files Browse the repository at this point in the history
The commit changes the attribute handling in the code to utilize int32_t and uint32_t types for better consistency and compatibility.
  • Loading branch information
diplfranzhoepfinger committed May 30, 2024
1 parent 53d8ec5 commit 8df9b25
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tinyxml2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2777,15 +2777,15 @@ void XMLPrinter::PushAttribute( const char* name, const char* value )
}


void XMLPrinter::PushAttribute( const char* name, int v )
void XMLPrinter::PushAttribute( const char* name, int32_t v )
{
char buf[BUF_SIZE];
XMLUtil::ToStr( v, buf, BUF_SIZE );
PushAttribute( name, buf );
}


void XMLPrinter::PushAttribute( const char* name, unsigned v )
void XMLPrinter::PushAttribute( const char* name, uint32_t v )
{
char buf[BUF_SIZE];
XMLUtil::ToStr( v, buf, BUF_SIZE );
Expand Down
4 changes: 2 additions & 2 deletions tinyxml2.h
Original file line number Diff line number Diff line change
Expand Up @@ -2258,8 +2258,8 @@ class TINYXML2_LIB XMLPrinter : public XMLVisitor
void OpenElement( const char* name, bool compactMode=false );
/// If streaming, add an attribute to an open element.
void PushAttribute( const char* name, const char* value );
void PushAttribute( const char* name, int value );
void PushAttribute( const char* name, unsigned value );
void PushAttribute( const char* name, int32_t value );
void PushAttribute( const char* name, uint32_t value );
void PushAttribute( const char* name, int64_t value );
void PushAttribute( const char* name, uint64_t value );
void PushAttribute( const char* name, bool value );
Expand Down

0 comments on commit 8df9b25

Please sign in to comment.