fix floating point specifier and clean up a warning

This commit is contained in:
Lee Thomason (grinliz) 2013-05-11 20:23:13 -07:00
parent f76fe94012
commit d6bd7360b8
2 changed files with 5 additions and 5 deletions

View File

@ -425,13 +425,13 @@ void XMLUtil::ToStr( bool 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 )
{
TIXML_SNPRINTF( buffer, bufferSize, "%g", v );
TIXML_SNPRINTF( buffer, bufferSize, "%f", v );
}

View File

@ -301,9 +301,9 @@ int main( int argc, const char ** argv )
printf( "Test file '%s' loaded. ErrorID=%d\n", argv[1], errorID );
if ( !errorID ) {
printf( "Load time=%d\n", loadTime - startTime );
printf( "Delete time=%d\n", deleteTime - loadTime );
printf( "Total time=%d\n", deleteTime - startTime );
printf( "Load time=%u\n", (unsigned)(loadTime - startTime) );
printf( "Delete time=%u\n", (unsigned)(deleteTime - loadTime) );
printf( "Total time=%u\n", (unsigned)(deleteTime - startTime) );
}
exit(0);
}