From c27ce66b3ae4ae0c2e4ce1910f0d0d2c9a1143db Mon Sep 17 00:00:00 2001 From: Jordy Ruiz Date: Wed, 31 Oct 2018 19:07:54 +0100 Subject: [PATCH] Fix names to abide by naming conventions --- src/game/client/components/binds.cpp | 18 +++++++++--------- src/game/client/components/binds.h | 2 +- src/game/client/components/menus_settings.cpp | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/game/client/components/binds.cpp b/src/game/client/components/binds.cpp index 742dc4f32..f0a4aab43 100644 --- a/src/game/client/components/binds.cpp +++ b/src/game/client/components/binds.cpp @@ -46,7 +46,7 @@ void CBinds::Bind(int KeyID, int Modifier, const char *pStr) Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "binds", aBuf); } -int CBinds::getMask(IInput *i) +int CBinds::GetModifierMask(IInput *i) { int Mask = 0; // since we only handle one modifier, when doing ctrl+q and shift+q, execute both @@ -78,7 +78,7 @@ bool CBinds::ModifierMatchesKey(int Modifier, int Key) bool CBinds::CBindsSpecial::OnInput(IInput::CEvent Event) { - int Mask = getMask(Input()); + int Mask = GetModifierMask(Input()); bool rtn = false; // don't handle anything but FX and composed binds @@ -102,7 +102,7 @@ bool CBinds::CBindsSpecial::OnInput(IInput::CEvent Event) bool CBinds::OnInput(IInput::CEvent Event) { - int Mask = getMask(Input()); + int Mask = GetModifierMask(Input()); // don't handle invalid events and keys that aren't set to anything if(Event.m_Key <= 0 || Event.m_Key >= KEY_LAST) @@ -184,8 +184,8 @@ void CBinds::ConBind(IConsole::IResult *pResult, void *pUserData) { CBinds *pBinds = (CBinds *)pUserData; const char *pKeyName = pResult->GetString(0); - int modifier; - int id = pBinds->DecodeBindString(pKeyName, &modifier); + int Modifier; + int id = pBinds->DecodeBindString(pKeyName, &Modifier); if(!id) { @@ -195,7 +195,7 @@ void CBinds::ConBind(IConsole::IResult *pResult, void *pUserData) return; } - pBinds->Bind(id, modifier, pResult->GetString(1)); + pBinds->Bind(id, Modifier, pResult->GetString(1)); } @@ -203,8 +203,8 @@ void CBinds::ConUnbind(IConsole::IResult *pResult, void *pUserData) { CBinds *pBinds = (CBinds *)pUserData; const char *pKeyName = pResult->GetString(0); - int modifier; - int id = pBinds->DecodeBindString(pKeyName, &modifier); + int Modifier; + int id = pBinds->DecodeBindString(pKeyName, &Modifier); if(!id) { @@ -214,7 +214,7 @@ void CBinds::ConUnbind(IConsole::IResult *pResult, void *pUserData) return; } - pBinds->Bind(id, modifier, ""); + pBinds->Bind(id, Modifier, ""); } diff --git a/src/game/client/components/binds.h b/src/game/client/components/binds.h index 64fd52852..cf111528b 100644 --- a/src/game/client/components/binds.h +++ b/src/game/client/components/binds.h @@ -44,7 +44,7 @@ public: const char *Get(int KeyID, int Modifier); void GetKey(const char *pBindStr, char aBuf[64]); static const char *GetModifierName(int m); - static int getMask(IInput *i); + static int GetModifierMask(IInput *i); static bool ModifierMatchesKey(int Modifier, int Key); virtual void OnConsoleInit(); diff --git a/src/game/client/components/menus_settings.cpp b/src/game/client/components/menus_settings.cpp index 0b78dc9e9..e27bd57d9 100644 --- a/src/game/client/components/menus_settings.cpp +++ b/src/game/client/components/menus_settings.cpp @@ -43,7 +43,7 @@ bool CMenusKeyBinder::OnInput(IInput::CEvent Event) m_GotKey = true; m_TakeKey = false; - int Mask = CBinds::getMask(Input()); // always > 0 + int Mask = CBinds::GetModifierMask(Input()); // always > 0 m_Modifier = 0; while(!(Mask&1)) // this computes a log2, we take the first modifier flag in mask. {