1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Don't display fractional part if it's 0.

This commit is contained in:
Bartosz Taudul 2019-02-10 01:03:35 +01:00
parent e4f4fee6d4
commit af16872693

View File

@ -110,8 +110,6 @@ static inline void PrintSmallIntFrac( char*& buf, uint64_t v )
if( fr >= 995 ) if( fr >= 995 )
{ {
PrintSmallInt( buf, in+1 ); PrintSmallInt( buf, in+1 );
memcpy( buf, ".00", 3 );
buf += 3;
} }
else else
{ {
@ -120,11 +118,6 @@ static inline void PrintSmallIntFrac( char*& buf, uint64_t v )
{ {
PrintFrac00( buf, fr ); PrintFrac00( buf, fr );
} }
else
{
memcpy( buf, ".00", 3 );
buf += 3;
}
} }
} }
@ -135,8 +128,6 @@ static inline void PrintSecondsFrac( char*& buf, uint64_t v )
if( fr >= 950 ) if( fr >= 950 )
{ {
PrintTinyInt0( buf, in+1 ); PrintTinyInt0( buf, in+1 );
memcpy( buf, ".0", 2 );
buf += 2;
} }
else else
{ {
@ -145,11 +136,6 @@ static inline void PrintSecondsFrac( char*& buf, uint64_t v )
{ {
PrintFrac0( buf, fr ); PrintFrac0( buf, fr );
} }
else
{
memcpy( buf, ".0", 2 );
buf += 2;
}
} }
} }