From 90562b515764948f36fcc038cd0a26ecf7fd2ffd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20M=C3=BCller?= Date: Fri, 26 Jul 2024 18:25:51 +0200 Subject: [PATCH] Make `CDamageInd::OnReset` function more efficient There is no need to copy the items if we only want to delete all of them. --- src/game/client/components/damageind.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/game/client/components/damageind.cpp b/src/game/client/components/damageind.cpp index 0ce173f38..8ea48067f 100644 --- a/src/game/client/components/damageind.cpp +++ b/src/game/client/components/damageind.cpp @@ -102,8 +102,5 @@ void CDamageInd::OnInit() void CDamageInd::OnReset() { - for(int i = 0; i < m_NumItems;) - { - DestroyI(&m_aItems[i]); - } + m_NumItems = 0; }