From ee66b1354dbaca023b0432a799f13bba4925288e Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sun, 10 Feb 2019 00:51:13 +0100 Subject: [PATCH] IntTable10 is not needed. --- server/TracyView.cpp | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 302e4949..1d42e6d8 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -54,28 +54,26 @@ static const char* IntTable100 = "80818283848586878889" "90919293949596979899"; -static const char* IntTable10 = "0123456789"; - static inline void PrintTinyInt( char*& buf, uint64_t v ) { if( v >= 10 ) { - *buf++ = IntTable10[v/10]; + *buf++ = '0' + v/10; } - *buf++ = IntTable10[v%10]; + *buf++ = '0' + v%10; } static inline void PrintTinyInt0( char*& buf, uint64_t v ) { if( v >= 10 ) { - *buf++ = IntTable10[v/10]; + *buf++ = '0' + v/10; } else { *buf++ = '0'; } - *buf++ = IntTable10[v%10]; + *buf++ = '0' + v%10; } static inline void PrintSmallInt( char*& buf, uint64_t v ) @@ -87,9 +85,9 @@ static inline void PrintSmallInt( char*& buf, uint64_t v ) } else if( v >= 10 ) { - *buf++ = IntTable10[v/10]; + *buf++ = '0' + v/10; } - *buf++ = IntTable10[v%10]; + *buf++ = '0' + v%10; } static inline void PrintFrac00( char*& buf, uint64_t v ) @@ -102,7 +100,7 @@ static inline void PrintFrac00( char*& buf, uint64_t v ) static inline void PrintFrac0( char*& buf, uint64_t v ) { *buf++ = '.'; - *buf++ = IntTable10[(v+50)/100]; + *buf++ = '0' + (v+50)/100; } static inline void PrintSmallIntFrac( char*& buf, uint64_t v )