From 0509fb03585f96d782ef43f9893826501b9bf8f2 Mon Sep 17 00:00:00 2001 From: Amos <48657826+Mauler125@users.noreply.github.com> Date: Mon, 28 Feb 2022 01:05:55 +0100 Subject: [PATCH] Cleanup all redundant empty control statements --- r5dev/engine/host_state.cpp | 2 +- r5dev/public/bansystem.cpp | 2 +- r5dev/public/include/bansystem.h | 2 +- r5dev/public/include/globalvars_base.h | 2 +- r5dev/thirdparty/lzham/lzham_huffman_codes.cpp | 2 +- r5dev/thirdparty/lzham/lzham_polar_codes.cpp | 2 +- r5dev/tier1/NetAdr2.cpp | 8 ++++---- r5dev/vpc/interfaces.h | 2 +- r5dev/vpc/keyvalues.h | 2 +- 9 files changed, 12 insertions(+), 12 deletions(-) diff --git a/r5dev/engine/host_state.cpp b/r5dev/engine/host_state.cpp index 72771094..19c41754 100644 --- a/r5dev/engine/host_state.cpp +++ b/r5dev/engine/host_state.cpp @@ -308,4 +308,4 @@ void CHostState_Detach() } /////////////////////////////////////////////////////////////////////////////// -CHostState* g_pHostState = reinterpret_cast(p_CHostState_FrameUpdate.FindPatternSelf("48 8D ?? ?? ?? ?? 01", ADDRESS::Direction::DOWN, 100).ResolveRelativeAddressSelf(0x3, 0x7).GetPtr());; +CHostState* g_pHostState = reinterpret_cast(p_CHostState_FrameUpdate.FindPatternSelf("48 8D ?? ?? ?? ?? 01", ADDRESS::Direction::DOWN, 100).ResolveRelativeAddressSelf(0x3, 0x7).GetPtr()); diff --git a/r5dev/public/bansystem.cpp b/r5dev/public/bansystem.cpp index 0ff3428f..dc17671b 100644 --- a/r5dev/public/bansystem.cpp +++ b/r5dev/public/bansystem.cpp @@ -265,4 +265,4 @@ bool CBanSystem::IsBanListValid(void) const return !vsvBanList.empty(); } /////////////////////////////////////////////////////////////////////////////// -CBanSystem* g_pBanSystem = new CBanSystem();; +CBanSystem* g_pBanSystem = new CBanSystem(); diff --git a/r5dev/public/include/bansystem.h b/r5dev/public/include/bansystem.h index ce07735f..b58d5ebc 100644 --- a/r5dev/public/include/bansystem.h +++ b/r5dev/public/include/bansystem.h @@ -22,7 +22,7 @@ public: void BanListCheck(void); private: - std::vector> vsvrefuseList = {};; + std::vector> vsvrefuseList = {}; std::vector> vsvBanList = {}; }; diff --git a/r5dev/public/include/globalvars_base.h b/r5dev/public/include/globalvars_base.h index bcc5d3e0..0a25ae8b 100644 --- a/r5dev/public/include/globalvars_base.h +++ b/r5dev/public/include/globalvars_base.h @@ -27,7 +27,7 @@ public: char m_nPad0[24]; // All unknown. int m_nMaxClients; // Current maxplayers setting int m_nMaxMilesAudioQueues_Maybe; // Only used on the server. - GameMode_t m_nGameMode;; // 1 (MP) 2 (PVE) 3 (SP) + GameMode_t m_nGameMode; // 1 (MP) 2 (PVE) 3 (SP) int m_nTickCount; // Simulation ticks - does not increase when game is paused - resets on restart. int m_nUnk0; int m_nUnk1; diff --git a/r5dev/thirdparty/lzham/lzham_huffman_codes.cpp b/r5dev/thirdparty/lzham/lzham_huffman_codes.cpp index 2ca7e392..1f27ad29 100644 --- a/r5dev/thirdparty/lzham/lzham_huffman_codes.cpp +++ b/r5dev/thirdparty/lzham/lzham_huffman_codes.cpp @@ -211,7 +211,7 @@ namespace lzham if ((!num_syms) || (num_syms > cHuffmanMaxSupportedSyms)) return false; - huffman_work_tables& state = *static_cast(pContext);; + huffman_work_tables& state = *static_cast(pContext); uint max_freq = 0; uint total_freq = 0; diff --git a/r5dev/thirdparty/lzham/lzham_polar_codes.cpp b/r5dev/thirdparty/lzham/lzham_polar_codes.cpp index 55696fff..80ea8291 100644 --- a/r5dev/thirdparty/lzham/lzham_polar_codes.cpp +++ b/r5dev/thirdparty/lzham/lzham_polar_codes.cpp @@ -364,7 +364,7 @@ namespace lzham if ((!num_syms) || (num_syms > cPolarMaxSupportedSyms)) return false; - polar_work_tables& state = *static_cast(pContext);; + polar_work_tables& state = *static_cast(pContext); uint max_freq = 0; uint total_freq = 0; diff --git a/r5dev/tier1/NetAdr2.cpp b/r5dev/tier1/NetAdr2.cpp index 42e6b8f0..247df5e0 100644 --- a/r5dev/tier1/NetAdr2.cpp +++ b/r5dev/tier1/NetAdr2.cpp @@ -416,13 +416,13 @@ void CNetAdr2::ToSockadr(sockaddr_storage* pSadr) const else if (GetType() == netadrtype_t::NA_IP) { reinterpret_cast(pSadr)->sin_family = AF_INET; - reinterpret_cast(pSadr)->sin_port = htons(stoi(GetPort()));; + reinterpret_cast(pSadr)->sin_port = htons(stoi(GetPort())); inet_pton(AF_INET, GetBase().c_str(), &reinterpret_cast(pSadr)->sin_addr.s_addr); } else if (GetType() == netadrtype_t::NA_LOOPBACK) { reinterpret_cast(pSadr)->sin_family = AF_INET; - reinterpret_cast(pSadr)->sin_port = htons(stoi(GetPort()));; + reinterpret_cast(pSadr)->sin_port = htons(stoi(GetPort())); reinterpret_cast(pSadr)->sin_addr.s_addr = INADDR_LOOPBACK; } } @@ -431,13 +431,13 @@ void CNetAdr2::ToSockadr(sockaddr_storage* pSadr) const if (GetType() == netadrtype_t::NA_IP) { reinterpret_cast(pSadr)->sin6_family = AF_INET6; - reinterpret_cast(pSadr)->sin6_port = htons(stoi(GetPort()));; + reinterpret_cast(pSadr)->sin6_port = htons(stoi(GetPort())); inet_pton(AF_INET6, GetBase().c_str(), &reinterpret_cast(pSadr)->sin6_addr); } else if (GetType() == netadrtype_t::NA_LOOPBACK) { reinterpret_cast(pSadr)->sin6_family = AF_INET6; - reinterpret_cast(pSadr)->sin6_port = htons(stoi(GetPort()));; + reinterpret_cast(pSadr)->sin6_port = htons(stoi(GetPort())); reinterpret_cast(pSadr)->sin6_addr = in6addr_loopback; } } diff --git a/r5dev/vpc/interfaces.h b/r5dev/vpc/interfaces.h index bf32a17a..fb121b33 100644 --- a/r5dev/vpc/interfaces.h +++ b/r5dev/vpc/interfaces.h @@ -35,7 +35,7 @@ class IFactory public: void GetFactoriesFromRegister(); - void AddFactory(FactoryInfo factoryInfo);; + void AddFactory(FactoryInfo factoryInfo); ADDRESS GetFactoryPtr(const std::string& factoryName, bool versionLess = true); std::vector factories = {}; diff --git a/r5dev/vpc/keyvalues.h b/r5dev/vpc/keyvalues.h index 05bd2854..44db26db 100644 --- a/r5dev/vpc/keyvalues.h +++ b/r5dev/vpc/keyvalues.h @@ -36,7 +36,7 @@ namespace ADDRESS p_KeyValues_FindKey = g_mGameDll.FindPatternSIMD((std::uint8_t*)"\x40\x56\x57\x41\x57\x48\x81\xEC\x00\x00\x00\x00\x45", "xxxxxxxx????x"); void* (*KeyValues_FindKey)(void* a1, const char* a2, bool a3) = (void* (*)(void*, const char*, bool))p_KeyValues_FindKey.GetPtr(); /*40 56 57 41 57 48 81 EC 30 01 00 00 45 0F B6 F8*/ #endif - ADDRESS p_KeyValues_LoadPlaylist = g_mGameDll.FindPatternSIMD((std::uint8_t*)"\xE8\x00\x00\x00\x00\x80\x3D\x00\x00\x00\x00\x00\x74\x0C", "x????xx?????xx").FollowNearCallSelf().GetPtr();; + ADDRESS p_KeyValues_LoadPlaylist = g_mGameDll.FindPatternSIMD((std::uint8_t*)"\xE8\x00\x00\x00\x00\x80\x3D\x00\x00\x00\x00\x00\x74\x0C", "x????xx?????xx").FollowNearCallSelf().GetPtr(); bool (*KeyValues_LoadPlaylist)(const char* source) = (bool (*)(const char*))p_KeyValues_LoadPlaylist.GetPtr(); /*E8 ?? ?? ?? ?? 80 3D ?? ?? ?? ?? ?? 74 0C*/ ADDRESS p_KeyValues_GetMemPool = g_mGameDll.FindPatternSIMD((std::uint8_t*)"\x48\x8B\x05\x00\x00\x00\x00\xC3\xCC\xCC\xCC\xCC\xCC\xCC\xCC\xCC\x48\x85\xD2", "xxx????xxxxxxxxxxxx");