From ef185a8f85e45bb9c9a2267017150b87052b2858 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franz=20H=C3=B6pfinger?= Date: Thu, 30 May 2024 20:05:52 +0200 Subject: [PATCH] Update PushText functions to use specific integer types The commit changes the PushText functions in both the .cpp and .h files to utilize int32_t and uint32_t instead of int and unsigned for better type specificity. --- tinyxml2.cpp | 4 ++-- tinyxml2.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tinyxml2.cpp b/tinyxml2.cpp index 1f7f392..d5609a2 100755 --- a/tinyxml2.cpp +++ b/tinyxml2.cpp @@ -2895,7 +2895,7 @@ void XMLPrinter::PushText( uint64_t value ) } -void XMLPrinter::PushText( int value ) +void XMLPrinter::PushText( int32_t value ) { char buf[BUF_SIZE]; XMLUtil::ToStr( value, buf, BUF_SIZE ); @@ -2903,7 +2903,7 @@ void XMLPrinter::PushText( int value ) } -void XMLPrinter::PushText( unsigned value ) +void XMLPrinter::PushText( uint32_t value ) { char buf[BUF_SIZE]; XMLUtil::ToStr( value, buf, BUF_SIZE ); diff --git a/tinyxml2.h b/tinyxml2.h index 66c8b36..07089d1 100755 --- a/tinyxml2.h +++ b/tinyxml2.h @@ -2270,9 +2270,9 @@ public: /// Add a text node. void PushText( const char* text, bool cdata=false ); /// Add a text node from an integer. - void PushText( int value ); + void PushText( int32_t value ); /// Add a text node from an unsigned. - void PushText( unsigned value ); + void PushText( uint32_t value ); /// Add a text node from a signed 64bit integer. void PushText( int64_t value ); /// Add a text node from an unsigned 64bit integer.