From f67acc637db8de6ed55d88647f842604be87a3d9 Mon Sep 17 00:00:00 2001 From: Uladzislau Nikalayevich Date: Wed, 6 Nov 2024 18:46:58 +0300 Subject: [PATCH] rename ECustomDataClientTrust --- Server/mods/deathmatch/logic/CCustomData.cpp | 4 ++-- Server/mods/deathmatch/logic/CCustomData.h | 6 +++--- Server/mods/deathmatch/logic/CStaticFunctionDefinitions.cpp | 4 ++-- Server/mods/deathmatch/logic/lua/CLuaFunctionParseHelpers.h | 2 +- Server/mods/deathmatch/logic/luadefs/CLuaElementDefs.cpp | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Server/mods/deathmatch/logic/CCustomData.cpp b/Server/mods/deathmatch/logic/CCustomData.cpp index 27e99ec015..545df5a0c3 100644 --- a/Server/mods/deathmatch/logic/CCustomData.cpp +++ b/Server/mods/deathmatch/logic/CCustomData.cpp @@ -100,7 +100,7 @@ void CCustomData::Set(const char* szName, const CLuaArgument& Variable, ESyncTyp SCustomData newData; newData.Variable = Variable; newData.syncType = syncType; - newData.clientChangesMode = ECustomDataClientTrust::UNSET; + newData.clientChangesMode = eCustomDataClientTrust::UNSET; m_Data[szName] = newData; UpdateSynced(szName, Variable, syncType); } @@ -121,7 +121,7 @@ bool CCustomData::Delete(const char* szName) return false; } -void CCustomData::SetClientChangesMode(const char* szName, ECustomDataClientTrust mode) +void CCustomData::SetClientChangesMode(const char* szName, eCustomDataClientTrust mode) { SCustomData& pData = m_Data[szName]; pData.clientChangesMode = mode; diff --git a/Server/mods/deathmatch/logic/CCustomData.h b/Server/mods/deathmatch/logic/CCustomData.h index 6f1dbc597f..887ef34dee 100644 --- a/Server/mods/deathmatch/logic/CCustomData.h +++ b/Server/mods/deathmatch/logic/CCustomData.h @@ -25,7 +25,7 @@ enum class ESyncType SUBSCRIBE, }; -enum class ECustomDataClientTrust : std::uint8_t +enum class eCustomDataClientTrust : std::uint8_t { UNSET, ALLOW, @@ -36,7 +36,7 @@ struct SCustomData { CLuaArgument Variable; ESyncType syncType; - ECustomDataClientTrust clientChangesMode; + eCustomDataClientTrust clientChangesMode; }; class CCustomData @@ -50,7 +50,7 @@ class CCustomData bool Delete(const char* szName); - void SetClientChangesMode(const char* szName, ECustomDataClientTrust mode); + void SetClientChangesMode(const char* szName, eCustomDataClientTrust mode); unsigned short CountOnlySynchronized(); diff --git a/Server/mods/deathmatch/logic/CStaticFunctionDefinitions.cpp b/Server/mods/deathmatch/logic/CStaticFunctionDefinitions.cpp index 2d65af0eaf..0614562a4e 100644 --- a/Server/mods/deathmatch/logic/CStaticFunctionDefinitions.cpp +++ b/Server/mods/deathmatch/logic/CStaticFunctionDefinitions.cpp @@ -955,14 +955,14 @@ bool CStaticFunctionDefinitions::SetElementID(CElement* pElement, const char* sz } bool CStaticFunctionDefinitions::SetElementData(CElement* pElement, const char* szName, const CLuaArgument& Variable, ESyncType syncType, - std::optional clientTrust) + std::optional clientTrust) { assert(pElement); assert(szName); assert(strlen(szName) <= MAX_CUSTOMDATA_NAME_LENGTH); ESyncType lastSyncType = ESyncType::BROADCAST; - ECustomDataClientTrust lastClientTrust{}; + eCustomDataClientTrust lastClientTrust{}; CLuaArgument* pCurrentVariable = pElement->GetCustomData(szName, false, &lastSyncType, &lastClientTrust); if (clientTrust.has_value() && lastClientTrust != clientTrust.value()) diff --git a/Server/mods/deathmatch/logic/lua/CLuaFunctionParseHelpers.h b/Server/mods/deathmatch/logic/lua/CLuaFunctionParseHelpers.h index f9cd0c85d9..796ca3c702 100644 --- a/Server/mods/deathmatch/logic/lua/CLuaFunctionParseHelpers.h +++ b/Server/mods/deathmatch/logic/lua/CLuaFunctionParseHelpers.h @@ -38,7 +38,7 @@ DECLARE_ENUM(CAccessControlListRight::ERightType); DECLARE_ENUM(CElement::EElementType); DECLARE_ENUM(CAccountPassword::EAccountPasswordType); DECLARE_ENUM_CLASS(ESyncType); -DECLARE_ENUM_CLASS(ECustomDataClientTrust) +DECLARE_ENUM_CLASS(eCustomDataClientTrust) enum eHudComponent { diff --git a/Server/mods/deathmatch/logic/luadefs/CLuaElementDefs.cpp b/Server/mods/deathmatch/logic/luadefs/CLuaElementDefs.cpp index 8e3e2f3969..f8effd7b89 100644 --- a/Server/mods/deathmatch/logic/luadefs/CLuaElementDefs.cpp +++ b/Server/mods/deathmatch/logic/luadefs/CLuaElementDefs.cpp @@ -1538,7 +1538,7 @@ int CLuaElementDefs::setElementData(lua_State* luaVM) SString strKey; CLuaArgument value; ESyncType syncType = ESyncType::BROADCAST; - std::optional clientTrust{}; + std::optional clientTrust{}; CScriptArgReader argStream(luaVM); argStream.ReadUserData(pElement); @@ -1557,7 +1557,7 @@ int CLuaElementDefs::setElementData(lua_State* luaVM) if (!argStream.NextIsNone()) { - ECustomDataClientTrust trustReaded; + eCustomDataClientTrust trustReaded; argStream.ReadEnumString(trustReaded); clientTrust = trustReaded; }