From 02600a3bc6d5e537a792102ac56abd5c19c28131 Mon Sep 17 00:00:00 2001 From: Green Sky Date: Sat, 30 Nov 2024 16:01:29 +0100 Subject: [PATCH] fix taking as copy instead of ref major cause for temporary allocations --- src/chat_gui4.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/chat_gui4.cpp b/src/chat_gui4.cpp index bf05c40..e089040 100644 --- a/src/chat_gui4.cpp +++ b/src/chat_gui4.cpp @@ -668,7 +668,7 @@ float ChatGui4::render(float time_delta) { // TODO: dedup? ImGui::TextDisabled("_"); } else { - const auto list = msg_reg.get(e).ts; + const auto& list = msg_reg.get(e).ts; // wrongly assumes contacts never get removed from a group if (sub_contacts != nullptr && list.size() < sub_contacts->size()) { // if partically delivered