From eb2afc8c56b31348276e161180e55161eba34249 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Fri, 16 Feb 2007 04:43:48 +0000 Subject: [PATCH] fixed linux build --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40509 --- core/CConCmdManager.cpp | 16 ++++++---------- core/Makefile | 3 ++- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/core/CConCmdManager.cpp b/core/CConCmdManager.cpp index 20858ed6..878eec78 100644 --- a/core/CConCmdManager.cpp +++ b/core/CConCmdManager.cpp @@ -245,22 +245,16 @@ void CConCmdManager::AddToCmdList(ConCmdInfo *info) List::iterator iter = m_CmdList.begin(); ConCmdInfo *pInfo; bool inserted = false; - const char *orig; + const char *orig = NULL; - if (info->pCmd) - { - orig = info->pCmd->GetName(); - } + orig = info->pCmd->GetName(); /* Insert this into the help list, SORTED alphabetically. */ while (iter != m_CmdList.end()) { const char *cmd = NULL; pInfo = (*iter); - if (pInfo->pCmd) - { - cmd = pInfo->pCmd->GetName(); - } + cmd = pInfo->pCmd->GetName(); if (strcmp(orig, cmd) < 0) { m_CmdList.insert(iter, info); @@ -278,7 +272,9 @@ void CConCmdManager::AddToCmdList(ConCmdInfo *info) void CConCmdManager::RemoveConCmd(ConCmdInfo *info) { - /* Remove console-specific information */ + /* Remove console-specific information + * This should always be true as of right now + */ if (info->pCmd) { /* Remove from the trie */ diff --git a/core/Makefile b/core/Makefile index c08a148e..5d0a8835 100644 --- a/core/Makefile +++ b/core/Makefile @@ -21,9 +21,10 @@ HL2LIB = $(HL2SDK)/linux_sdk OBJECTS = sourcemm_api.cpp sourcemod.cpp AdminCache.cpp CConVarManager.cpp CDataPack.cpp \ CDbgReporter.cpp CLogger.cpp CPlayerManager.cpp CTextParsers.cpp CTranslator.cpp \ + CConCmdManager.cpp \ sm_autonatives.cpp sm_memtable.cpp sm_srvcmds.cpp sm_trie.cpp \ sm_stringutil.cpp smn_filesystem.cpp smn_float.cpp smn_handles.cpp \ - smn_player.cpp smn_string.cpp smn_textparse.cpp smn_convar.cpp smn_admin.cpp \ + smn_player.cpp smn_string.cpp smn_textparse.cpp smn_console.cpp smn_admin.cpp \ smn_datapacks.cpp smn_lang.cpp \ systems/ExtensionSys.cpp systems/ForwardSys.cpp systems/HandleSys.cpp \ systems/LibrarySys.cpp systems/PluginInfoDatabase.cpp \