diff options
Diffstat (limited to 'primedev')
-rw-r--r-- | primedev/client/localchatwriter.cpp | 10 | ||||
-rw-r--r-- | primedev/core/hooks.cpp | 14 | ||||
-rw-r--r-- | primedev/core/hooks.h | 10 | ||||
-rw-r--r-- | primedev/core/math/vector.h | 42 | ||||
-rw-r--r-- | primedev/logging/logging.h | 9 | ||||
-rw-r--r-- | primedev/masterserver/masterserver.cpp | 7 | ||||
-rw-r--r-- | primedev/plugins/interfaces/interface.cpp | 3 | ||||
-rw-r--r-- | primedev/plugins/plugins.cpp | 3 | ||||
-rw-r--r-- | primedev/squirrel/squirrelclasstypes.h | 3 | ||||
-rw-r--r-- | primedev/util/utils.h | 5 |
10 files changed, 86 insertions, 20 deletions
diff --git a/primedev/client/localchatwriter.cpp b/primedev/client/localchatwriter.cpp index 35cc065f..042e77d9 100644 --- a/primedev/client/localchatwriter.cpp +++ b/primedev/client/localchatwriter.cpp @@ -102,7 +102,10 @@ Color lightColors[8] = { class AnsiEscapeParser { public: - explicit AnsiEscapeParser(LocalChatWriter* writer) : m_writer(writer) {} + explicit AnsiEscapeParser(LocalChatWriter* writer) + : m_writer(writer) + { + } void HandleVal(unsigned long val) { @@ -257,7 +260,10 @@ private: } }; -LocalChatWriter::LocalChatWriter(Context context) : m_context(context) {} +LocalChatWriter::LocalChatWriter(Context context) + : m_context(context) +{ +} void LocalChatWriter::Write(const char* str) { diff --git a/primedev/core/hooks.cpp b/primedev/core/hooks.cpp index d8fad409..7ce98331 100644 --- a/primedev/core/hooks.cpp +++ b/primedev/core/hooks.cpp @@ -85,9 +85,19 @@ void __fileAutohook::DispatchForModule(const char* pModuleName) hook->Dispatch(); } -ManualHook::ManualHook(const char* funcName, LPVOID func) : svFuncName(funcName), pHookFunc(func), ppOrigFunc(nullptr) {} +ManualHook::ManualHook(const char* funcName, LPVOID func) + : svFuncName(funcName) + , pHookFunc(func) + , ppOrigFunc(nullptr) +{ +} -ManualHook::ManualHook(const char* funcName, LPVOID* orig, LPVOID func) : svFuncName(funcName), pHookFunc(func), ppOrigFunc(orig) {} +ManualHook::ManualHook(const char* funcName, LPVOID* orig, LPVOID func) + : svFuncName(funcName) + , pHookFunc(func) + , ppOrigFunc(orig) +{ +} bool ManualHook::Dispatch(LPVOID addr, LPVOID* orig) { diff --git a/primedev/core/hooks.h b/primedev/core/hooks.h index 023b7411..26d9483c 100644 --- a/primedev/core/hooks.h +++ b/primedev/core/hooks.h @@ -140,7 +140,9 @@ public: __autohook() = delete; __autohook(__fileAutohook* autohook, const char* funcName, LPVOID absoluteAddress, LPVOID* orig, LPVOID func) - : pHookFunc(func), ppOrigFunc(orig), iAbsoluteAddress(absoluteAddress) + : pHookFunc(func) + , ppOrigFunc(orig) + , iAbsoluteAddress(absoluteAddress) { iAddressResolutionMode = ABSOLUTE_ADDR; @@ -152,7 +154,8 @@ public: } __autohook(__fileAutohook* autohook, const char* funcName, const char* addrString, LPVOID* orig, LPVOID func) - : pHookFunc(func), ppOrigFunc(orig) + : pHookFunc(func) + , ppOrigFunc(orig) { iAddressResolutionMode = OFFSET_STRING; @@ -168,7 +171,8 @@ public: } __autohook(__fileAutohook* autohook, const char* funcName, const char* moduleName, const char* procName, LPVOID* orig, LPVOID func) - : pHookFunc(func), ppOrigFunc(orig) + : pHookFunc(func) + , ppOrigFunc(orig) { iAddressResolutionMode = PROCADDRESS; diff --git a/primedev/core/math/vector.h b/primedev/core/math/vector.h index 0face732..ea1de65e 100644 --- a/primedev/core/math/vector.h +++ b/primedev/core/math/vector.h @@ -13,9 +13,24 @@ class Vector3 public: float x, y, z; - Vector3(float _x, float _y, float _z) : x(_x), y(_y), z(_z) {} - Vector3(float _f) : x(_f), y(_f), z(_f) {} - Vector3() : x(0.0f), y(0.0f), z(0.0f) {} + Vector3(float _x, float _y, float _z) + : x(_x) + , y(_y) + , z(_z) + { + } + Vector3(float _f) + : x(_f) + , y(_f) + , z(_f) + { + } + Vector3() + : x(0.0f) + , y(0.0f) + , z(0.0f) + { + } inline bool IsValid() { return IsFinite(x) && IsFinite(y) && IsFinite(z); } @@ -302,9 +317,24 @@ public: float y; float z; - QAngle(float _x, float _y, float _z) : x(_x), y(_y), z(_z) {} - QAngle(float _f) : x(_f), y(_f), z(_f) {} - QAngle() : x(0.0f), y(0.0f), z(0.0f) {} + QAngle(float _x, float _y, float _z) + : x(_x) + , y(_y) + , z(_z) + { + } + QAngle(float _f) + : x(_f) + , y(_f) + , z(_f) + { + } + QAngle() + : x(0.0f) + , y(0.0f) + , z(0.0f) + { + } Vector3 GetNormal() const; diff --git a/primedev/logging/logging.h b/primedev/logging/logging.h index be41cb39..edfa20dc 100644 --- a/primedev/logging/logging.h +++ b/primedev/logging/logging.h @@ -14,7 +14,11 @@ class ColoredLogger; struct custom_log_msg : spdlog::details::log_msg { public: - custom_log_msg(ColoredLogger* origin, spdlog::details::log_msg msg) : origin(origin), spdlog::details::log_msg(msg) {} + custom_log_msg(ColoredLogger* origin, spdlog::details::log_msg msg) + : origin(origin) + , spdlog::details::log_msg(msg) + { + } ColoredLogger* origin; }; @@ -38,7 +42,8 @@ public: std::vector<std::shared_ptr<CustomSink>> custom_sinks_; - ColoredLogger(std::string name, Color color, bool first = false) : spdlog::logger(*spdlog::default_logger()) + ColoredLogger(std::string name, Color color, bool first = false) + : spdlog::logger(*spdlog::default_logger()) { name_ = std::move(name); if (!first) diff --git a/primedev/masterserver/masterserver.cpp b/primedev/masterserver/masterserver.cpp index e7bb1132..56ab608d 100644 --- a/primedev/masterserver/masterserver.cpp +++ b/primedev/masterserver/masterserver.cpp @@ -992,7 +992,12 @@ void ConCommand_ns_fetchservers(const CCommand& args) g_pMasterServerManager->RequestServerList(); } -MasterServerManager::MasterServerManager() : m_pendingConnectionInfo {}, m_sOwnServerId {""}, m_sOwnClientAuthToken {""} {} +MasterServerManager::MasterServerManager() + : m_pendingConnectionInfo {} + , m_sOwnServerId {""} + , m_sOwnClientAuthToken {""} +{ +} ON_DLL_LOAD_RELIESON("engine.dll", MasterServer, (ConCommand, ServerPresence), (CModule module)) { diff --git a/primedev/plugins/interfaces/interface.cpp b/primedev/plugins/interfaces/interface.cpp index 4c006f2c..bc900542 100644 --- a/primedev/plugins/interfaces/interface.cpp +++ b/primedev/plugins/interfaces/interface.cpp @@ -3,7 +3,8 @@ InterfaceReg* s_pInterfaceRegs; -InterfaceReg::InterfaceReg(InstantiateInterfaceFn fn, const char* pName) : m_pName(pName) +InterfaceReg::InterfaceReg(InstantiateInterfaceFn fn, const char* pName) + : m_pName(pName) { m_CreateFn = fn; m_pNext = s_pInterfaceRegs; diff --git a/primedev/plugins/plugins.cpp b/primedev/plugins/plugins.cpp index 03dd2c9e..f0a9c3c5 100644 --- a/primedev/plugins/plugins.cpp +++ b/primedev/plugins/plugins.cpp @@ -22,7 +22,8 @@ bool isValidSquirrelIdentifier(std::string s) return true; } -Plugin::Plugin(std::string path) : m_location(path) +Plugin::Plugin(std::string path) + : m_location(path) { HMODULE pluginModule = GetModuleHandleA(path.c_str()); diff --git a/primedev/squirrel/squirrelclasstypes.h b/primedev/squirrel/squirrelclasstypes.h index 3a39c957..55897b69 100644 --- a/primedev/squirrel/squirrelclasstypes.h +++ b/primedev/squirrel/squirrelclasstypes.h @@ -174,7 +174,8 @@ class SquirrelAsset { public: std::string path; - SquirrelAsset(std::string path) : path(path) {}; + SquirrelAsset(std::string path) + : path(path) {}; }; #pragma region TypeDefs diff --git a/primedev/util/utils.h b/primedev/util/utils.h index 4b7f57c8..c613d16d 100644 --- a/primedev/util/utils.h +++ b/primedev/util/utils.h @@ -8,7 +8,10 @@ public: auto operator=(ScopeGuard&) = delete; ScopeGuard(ScopeGuard&) = delete; - ScopeGuard(T callback) : m_callback(callback) {} + ScopeGuard(T callback) + : m_callback(callback) + { + } ~ScopeGuard() { if (!m_dismissed) |