From e438e1c53dff832b6da9a7bbfb03430cc036cc39 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Thu, 27 Feb 2020 17:05:48 +0100 Subject: [PATCH] Add another percent print helper. --- server/TracyView.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 065309a7..7b8f154a 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -6640,6 +6640,13 @@ static tracy_force_inline void PrintStringPercent( char* buf, const char* string memcpy( end, "%)", 3 ); } +static tracy_force_inline void PrintStringPercent( char* buf, double percent ) +{ + memcpy( buf, "(", 2 ); + auto end = PrintFloat( buf+1, buf+64, percent, 2 ); + memcpy( end, "%)", 3 ); +} + template void View::DrawZoneInfoChildren( const V& children, int64_t ztime ) {