From fb6f63f06f48e4e233d5e9762bd8c49189ac096f Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Mon, 15 Aug 2022 15:22:57 +0200 Subject: [PATCH] Remove const qualifier from shortened function names. --- server/TracyView_Utility.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/server/TracyView_Utility.cpp b/server/TracyView_Utility.cpp index df94b98a..c6731229 100644 --- a/server/TracyView_Utility.cpp +++ b/server/TracyView_Utility.cpp @@ -883,7 +883,14 @@ const char* View::ShortenZoneName( const char* name, ImVec2& tsz, float zsz ) co *dst++ = ')'; } - tsz = ImGui::CalcTextSize( buf ); + end = dst-1; + if( end - buf > 6 && memcmp( end-6, " const", 6 ) == 0 ) + { + dst[-7] = '\0'; + end -= 6; + } + + tsz = ImGui::CalcTextSize( buf, end ); return buf; }