From 623dfa17d50249b58dd1db62828b1f2a71e0f3f9 Mon Sep 17 00:00:00 2001 From: Tixx <83774803+WiserTixx@users.noreply.github.com> Date: Fri, 20 Sep 2024 14:45:41 +0200 Subject: [PATCH] Remove expiry check and add braces --- src/TLuaEngine.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/TLuaEngine.cpp b/src/TLuaEngine.cpp index a53b6b8..5e88597 100644 --- a/src/TLuaEngine.cpp +++ b/src/TLuaEngine.cpp @@ -597,10 +597,11 @@ sol::table TLuaEngine::StateThreadData::Lua_GetPlayerIdentifiers(int ID) { std::string TLuaEngine::StateThreadData::Lua_GetPlayerRole(int ID) { auto MaybeClient = GetClient(mEngine->Server(), ID); - if (MaybeClient && !MaybeClient.value().expired()) + if (MaybeClient) { return MaybeClient.value().lock()->GetRoles(); - else + } else { return ""; + } }