From 6c8fa6b4f02dd01dd83a22fef07a255caae783a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20M=C3=BCller?= Date: Thu, 27 Oct 2022 22:21:08 +0200 Subject: [PATCH] Rename variable `aBuf` to `pBuf`, use `size_t` for buffer size --- src/game/client/components/binds.cpp | 8 ++++---- src/game/client/components/binds.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/game/client/components/binds.cpp b/src/game/client/components/binds.cpp index 48e54827a..736e79fa2 100644 --- a/src/game/client/components/binds.cpp +++ b/src/game/client/components/binds.cpp @@ -175,9 +175,9 @@ const char *CBinds::Get(int KeyID, int ModifierCombination) return ""; } -void CBinds::GetKey(const char *pBindStr, char *aBuf, unsigned BufSize) +void CBinds::GetKey(const char *pBindStr, char *pBuf, size_t BufSize) { - aBuf[0] = 0; + pBuf[0] = 0; for(int Mod = 0; Mod < MODIFIER_COMBINATION_COUNT; Mod++) { for(int KeyId = 0; KeyId < KEY_LAST; KeyId++) @@ -189,9 +189,9 @@ void CBinds::GetKey(const char *pBindStr, char *aBuf, unsigned BufSize) if(str_comp(pBind, pBindStr) == 0) { if(Mod) - str_format(aBuf, BufSize, "%s+%s", GetModifierName(Mod), Input()->KeyName(KeyId)); + str_format(pBuf, BufSize, "%s+%s", GetModifierName(Mod), Input()->KeyName(KeyId)); else - str_copy(aBuf, Input()->KeyName(KeyId), BufSize); + str_copy(pBuf, Input()->KeyName(KeyId), BufSize); return; } } diff --git a/src/game/client/components/binds.h b/src/game/client/components/binds.h index 300d671bf..0cd55a360 100644 --- a/src/game/client/components/binds.h +++ b/src/game/client/components/binds.h @@ -52,7 +52,7 @@ public: void SetDefaults(); void UnbindAll(); const char *Get(int KeyID, int ModifierCombination); - void GetKey(const char *pBindStr, char *aBuf, unsigned BufSize); + void GetKey(const char *pBindStr, char *pBuf, size_t BufSize); int GetBindSlot(const char *pBindString, int *pModifierCombination); static int GetModifierMask(IInput *pInput); static int GetModifierMaskOfKey(int Key);