From 2ad2fa0b4a1f66c018765267c940b1fbb1ad3bf0 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Mon, 12 May 2025 22:36:10 +0200 Subject: [PATCH] Get role string only once. --- profiler/src/profiler/TracyLlm.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/profiler/src/profiler/TracyLlm.cpp b/profiler/src/profiler/TracyLlm.cpp index c9aa1b56..39ba3759 100644 --- a/profiler/src/profiler/TracyLlm.cpp +++ b/profiler/src/profiler/TracyLlm.cpp @@ -183,8 +183,9 @@ void TracyLlm::Draw() const auto mw = std::max( { uw, rw, ew } ); const auto posStart = ImGui::GetCursorPos().x; - const auto isUser = line["role"].get() == "user"; - const auto isError = line["role"].get() == "error"; + const auto role = line["role"].get(); + const auto isUser = role == "user"; + const auto isError = role == "error"; float diff, offset; if( isUser )