From a5b3b2dea481d0bb7369d00b272a9a7672efeb9d Mon Sep 17 00:00:00 2001 From: Amos <48657826+Mauler125@users.noreply.github.com> Date: Sun, 13 Feb 2022 15:16:09 +0100 Subject: [PATCH] Update comment blocks --- r5dev/engine/sv_rcon.cpp | 13 +++++++------ r5dev/gameui/IConsole.cpp | 2 +- r5dev/netconsole/netconsole.cpp | 16 ++++++++-------- r5dev/netconsole/netconsole.h | 2 +- r5dev/tier0/IConVar.cpp | 4 ++-- r5dev/tier0/cmd.cpp | 2 +- r5dev/tier0/commandline.cpp | 2 +- r5dev/tier1/NetAdr2.cpp | 10 +++++----- 8 files changed, 26 insertions(+), 25 deletions(-) diff --git a/r5dev/engine/sv_rcon.cpp b/r5dev/engine/sv_rcon.cpp index 49d50bd5..80090aaf 100644 --- a/r5dev/engine/sv_rcon.cpp +++ b/r5dev/engine/sv_rcon.cpp @@ -95,7 +95,7 @@ void CRConServer::RunFrame(void) //----------------------------------------------------------------------------- // Purpose: send message -// Input : svMessage - +// Input : *svMessage - //----------------------------------------------------------------------------- void CRConServer::Send(const std::string& svMessage) const { @@ -171,8 +171,8 @@ void CRConServer::Recv(void) //----------------------------------------------------------------------------- // Purpose: serializes input -// Input : svRspBuf - -// svRspVal - +// Input : *svRspBuf - +// *svRspVal - // response_t - // Output : serialized results as string //----------------------------------------------------------------------------- @@ -206,7 +206,7 @@ std::string CRConServer::Serialize(const std::string& svRspBuf, const std::strin //----------------------------------------------------------------------------- // Purpose: de-serializes input -// Input : svBuf - +// Input : *svBuf - // Output : de-serialized object //----------------------------------------------------------------------------- cl_rcon::request CRConServer::Deserialize(const std::string& svBuf) const @@ -219,8 +219,9 @@ cl_rcon::request CRConServer::Deserialize(const std::string& svBuf) const //----------------------------------------------------------------------------- // Purpose: authenticate new connections -// Input : *pData - -// TODO : implement logic for key exchange instead so we never network our +// Input : *cl_request - +// *pData - +// Todo : implement logic for key exchange instead so we never network our // password in plain text over the wire. create a cvar for this so user could // also opt out and use legacy authentication instead for older RCON clients //----------------------------------------------------------------------------- diff --git a/r5dev/gameui/IConsole.cpp b/r5dev/gameui/IConsole.cpp index 76705501..236d0b90 100644 --- a/r5dev/gameui/IConsole.cpp +++ b/r5dev/gameui/IConsole.cpp @@ -356,7 +356,7 @@ void CConsole::SuggestPanel(void) } //----------------------------------------------------------------------------- -// purpose: checks if the console can autocomplete based on input +// Purpose: checks if the console can autocomplete based on input //----------------------------------------------------------------------------- bool CConsole::CanAutoComplete(void) { diff --git a/r5dev/netconsole/netconsole.cpp b/r5dev/netconsole/netconsole.cpp index c6fc1d29..32d84f5e 100644 --- a/r5dev/netconsole/netconsole.cpp +++ b/r5dev/netconsole/netconsole.cpp @@ -198,8 +198,8 @@ bool CNetCon::ShouldQuit(void) const //----------------------------------------------------------------------------- // Purpose: connect to specified address and port -// Input : svInAdr - -// svInPort - +// Input : *svInAdr - +// *svInPort - // Output : true if connection succeeds, false otherwise //----------------------------------------------------------------------------- bool CNetCon::Connect(const std::string& svInAdr, const std::string& svInPort) @@ -233,7 +233,7 @@ void CNetCon::Disconnect(void) //----------------------------------------------------------------------------- // Purpose: send message -// Input : svMessage - +// Input : *svMessage - //----------------------------------------------------------------------------- void CNetCon::Send(const std::string& svMessage) const { @@ -328,7 +328,7 @@ void CNetCon::ProcessBuffer(const char* pszIn, int nRecvLen) const //----------------------------------------------------------------------------- // Purpose: processes received message -// Input : sv_response - +// Input : *sv_response - //----------------------------------------------------------------------------- void CNetCon::ProcessMessage(const sv_rcon::response& sv_response) const { @@ -359,8 +359,8 @@ void CNetCon::ProcessMessage(const sv_rcon::response& sv_response) const //----------------------------------------------------------------------------- // Purpose: serializes input -// Input : svReqBuf - -// svReqVal - +// Input : *svReqBuf - +// *svReqVal - // request_t - // Output : serialized results as string //----------------------------------------------------------------------------- @@ -391,10 +391,10 @@ std::string CNetCon::Serialize(const std::string& svReqBuf, const std::string& s //----------------------------------------------------------------------------- // Purpose: de-serializes input -// Input : pszBuf - +// Input : *svBuf - // Output : de-serialized object //----------------------------------------------------------------------------- -sv_rcon::response CNetCon::Deserialize(std::string svBuf) const +sv_rcon::response CNetCon::Deserialize(const std::string& svBuf) const { sv_rcon::response sv_response; sv_response.ParseFromArray(svBuf.c_str(), static_cast(svBuf.size())); diff --git a/r5dev/netconsole/netconsole.h b/r5dev/netconsole/netconsole.h index e4a4f7f8..08f48621 100644 --- a/r5dev/netconsole/netconsole.h +++ b/r5dev/netconsole/netconsole.h @@ -31,7 +31,7 @@ public: void ProcessMessage(const sv_rcon::response& sv_response) const; std::string Serialize(const std::string& svReqBuf, const std::string& svReqVal, cl_rcon::request_t request_t) const; - sv_rcon::response Deserialize(std::string svBuf) const; + sv_rcon::response Deserialize(const std::string& svBuf) const; private: CNetAdr2* m_pNetAdr2 = new CNetAdr2("localhost", "37015"); diff --git a/r5dev/tier0/IConVar.cpp b/r5dev/tier0/IConVar.cpp index a1a4a958..b15b1b2c 100644 --- a/r5dev/tier0/IConVar.cpp +++ b/r5dev/tier0/IConVar.cpp @@ -12,7 +12,7 @@ #include "mathlib/bits.h" //----------------------------------------------------------------------------- -// purpose: construct/allocate +// Purpose: construct/allocate //----------------------------------------------------------------------------- ConVar::ConVar(const char* pszName, const char* pszDefaultValue, int nFlags, const char* pszHelpString, bool bMin, float fMin, bool bMax, float fMax, void* pCallback, void* unk) { @@ -31,7 +31,7 @@ ConVar::ConVar(const char* pszName, const char* pszDefaultValue, int nFlags, con } //----------------------------------------------------------------------------- -// purpose: destructor +// Purpose: destructor //----------------------------------------------------------------------------- ConVar::~ConVar(void) { diff --git a/r5dev/tier0/cmd.cpp b/r5dev/tier0/cmd.cpp index 849044a4..56b4c8a1 100644 --- a/r5dev/tier0/cmd.cpp +++ b/r5dev/tier0/cmd.cpp @@ -6,7 +6,7 @@ #include "engine/sys_utils.h" //----------------------------------------------------------------------------- -// purpose: construct/allocate +// Purpose: construct/allocate //----------------------------------------------------------------------------- ConCommand::ConCommand(const char* pszName, const char* pszHelpString, int nFlags, void* pCallback, void* pCommandCompletionCallback) { diff --git a/r5dev/tier0/commandline.cpp b/r5dev/tier0/commandline.cpp index 181e6624..ec07c67f 100644 --- a/r5dev/tier0/commandline.cpp +++ b/r5dev/tier0/commandline.cpp @@ -81,7 +81,7 @@ void CCommandLine::AppendParm(const char* pszParm, const char* pszValues) } //----------------------------------------------------------------------------- -// purpose: returns the argument after the one specified, or the default if not found +// Purpose: returns the argument after the one specified, or the default if not found //----------------------------------------------------------------------------- const char* CCommandLine::ParmValue(const char* psz, const char* pDefaultVal) { diff --git a/r5dev/tier1/NetAdr2.cpp b/r5dev/tier1/NetAdr2.cpp index f39fb864..f5b9d30c 100644 --- a/r5dev/tier1/NetAdr2.cpp +++ b/r5dev/tier1/NetAdr2.cpp @@ -12,7 +12,7 @@ //----------------------------------------------------------------------------- // Purpose: constructor (use this when string contains <[IP]:PORT> or 'loopback'/'localhost'). -// input : svInAdr - +// Input : svInAdr - //----------------------------------------------------------------------------- CNetAdr2::CNetAdr2(std::string svInAdr) { @@ -43,7 +43,7 @@ CNetAdr2::CNetAdr2(std::string svInAdr) //----------------------------------------------------------------------------- // Purpose: constructor (expects string format ). -// input : svInAdr - +// Input : svInAdr - // svInPort - //----------------------------------------------------------------------------- CNetAdr2::CNetAdr2(std::string svInAdr, std::string svInPort) @@ -86,7 +86,7 @@ CNetAdr2::~CNetAdr2(void) //----------------------------------------------------------------------------- // Purpose: sets the IP address. -// input : svInAdr - +// Input : svInAdr - //----------------------------------------------------------------------------- void CNetAdr2::SetIP(const std::string& svInAdr) { @@ -95,7 +95,7 @@ void CNetAdr2::SetIP(const std::string& svInAdr) //----------------------------------------------------------------------------- // Purpose: sets the port. -// input : svInPort - +// Input : svInPort - //----------------------------------------------------------------------------- void CNetAdr2::SetPort(const std::string& svInPort) { @@ -104,7 +104,7 @@ void CNetAdr2::SetPort(const std::string& svInPort) //----------------------------------------------------------------------------- // Purpose: sets the IP address and port. -// input : svInAdr - +// Input : svInAdr - // svInPort - //----------------------------------------------------------------------------- void CNetAdr2::SetIPAndPort(const std::string& svInAdr, const std::string& svInPort)