From 2f6cbf45498dbed50236c749e4957d797b98ce38 Mon Sep 17 00:00:00 2001 From: Edo Date: Thu, 18 Aug 2022 22:08:41 +0200 Subject: [PATCH] [Chat] Do what snake suggested in /master for lambdas (#442) --- src/Components/Modules/Chat.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/Components/Modules/Chat.cpp b/src/Components/Modules/Chat.cpp index 7c67009d..087d32ed 100644 --- a/src/Components/Modules/Chat.cpp +++ b/src/Components/Modules/Chat.cpp @@ -236,16 +236,12 @@ namespace Components bool Chat::IsMuted(const Game::gentity_s* ent) { - auto result = false; const auto clientNum = ent->s.number; const auto xuid = Game::svs_clients[clientNum].steamID; - MutedList.access([&](muteList& clients) + const auto result = MutedList.access([&](muteList& clients) { - if (clients.contains(xuid)) - { - result = true; - } + return clients.contains(xuid); }); return result;