From e04c165d17c7a0a2d496924ddb9a6bf0dfc13930 Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Wed, 6 Jul 2022 11:42:12 +0200 Subject: [PATCH] Return size_t for 'con_suggestion_limit' in 'CConsole::FindFromPartial' --- r5dev/gameui/IConsole.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/r5dev/gameui/IConsole.cpp b/r5dev/gameui/IConsole.cpp index 027fc903..067463df 100644 --- a/r5dev/gameui/IConsole.cpp +++ b/r5dev/gameui/IConsole.cpp @@ -463,18 +463,16 @@ void CConsole::FindFromPartial(void) for (size_t i = 0; i < m_vsvCommandBases.size(); i++) { - if (m_vSuggest.size() < con_suggestion_limit->GetInt()) + if (m_vSuggest.size() < con_suggestion_limit->GetSizeT()) { if (m_vsvCommandBases[i].m_svName.find(m_szInputBuf) != string::npos) { if (std::find(m_vSuggest.begin(), m_vSuggest.end(), m_vsvCommandBases[i].m_svName) == m_vSuggest.end()) { - int nFlags = 0; - string svValue; - ConCommandBase* pCommandBase = g_pCVar->FindCommandBase(m_vsvCommandBases[i].m_svName.c_str()); + string svValue; int nFlags = 0; - if (pCommandBase) + if (ConCommandBase* pCommandBase = g_pCVar->FindCommandBase(m_vsvCommandBases[i].m_svName.c_str())) { if (!pCommandBase->IsCommand()) {