mirror of https://github.com/AxioDL/tinyxml2.git
fix floating point specifier and clean up a warning
This commit is contained in:
parent
f76fe94012
commit
d6bd7360b8
|
@ -425,13 +425,13 @@ void XMLUtil::ToStr( bool v, char* buffer, int bufferSize )
|
||||||
|
|
||||||
void XMLUtil::ToStr( float v, char* buffer, int bufferSize )
|
void XMLUtil::ToStr( float v, char* buffer, int bufferSize )
|
||||||
{
|
{
|
||||||
TIXML_SNPRINTF( buffer, bufferSize, "%g", v );
|
TIXML_SNPRINTF( buffer, bufferSize, "%f", v );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void XMLUtil::ToStr( double v, char* buffer, int bufferSize )
|
void XMLUtil::ToStr( double v, char* buffer, int bufferSize )
|
||||||
{
|
{
|
||||||
TIXML_SNPRINTF( buffer, bufferSize, "%g", v );
|
TIXML_SNPRINTF( buffer, bufferSize, "%f", v );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -301,9 +301,9 @@ int main( int argc, const char ** argv )
|
||||||
|
|
||||||
printf( "Test file '%s' loaded. ErrorID=%d\n", argv[1], errorID );
|
printf( "Test file '%s' loaded. ErrorID=%d\n", argv[1], errorID );
|
||||||
if ( !errorID ) {
|
if ( !errorID ) {
|
||||||
printf( "Load time=%d\n", loadTime - startTime );
|
printf( "Load time=%u\n", (unsigned)(loadTime - startTime) );
|
||||||
printf( "Delete time=%d\n", deleteTime - loadTime );
|
printf( "Delete time=%u\n", (unsigned)(deleteTime - loadTime) );
|
||||||
printf( "Total time=%d\n", deleteTime - startTime );
|
printf( "Total time=%u\n", (unsigned)(deleteTime - startTime) );
|
||||||
}
|
}
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue