mirror of
https://github.com/R2Northstar/NorthstarLauncher
synced 2026-08-23 20:26:04 -04:00
test formatting
This commit is contained in:
parent
f6915dc331
commit
87cbdf9a16
10 changed files with 86 additions and 20 deletions
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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());
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue