From f14c0e2359c24d138dc735ce88c0e3078b7a6963 Mon Sep 17 00:00:00 2001 From: oy Date: Wed, 4 Jan 2012 01:19:54 +0100 Subject: [PATCH] fixed linking for older gcc versions --- src/engine/shared/netban.cpp | 12 ------------ src/engine/shared/netban.h | 11 ++++++++++- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/src/engine/shared/netban.cpp b/src/engine/shared/netban.cpp index eebe7c849..ee3b057e1 100644 --- a/src/engine/shared/netban.cpp +++ b/src/engine/shared/netban.cpp @@ -224,18 +224,6 @@ void CNetBan::CBanPool::Reset() m_pFirstFree = &m_aBans[0]; } -template -typename CNetBan::CBan *CNetBan::CBanPool::Find(const T *pData, const CNetHash *pNetHash) const -{ - for(CBan *pBan = m_paaHashList[pNetHash->m_HashIndex][pNetHash->m_Hash]; pBan; pBan = pBan->m_pHashNext) - { - if(NetComp(&pBan->m_Data, pData) == 0) - return pBan; - } - - return 0; -} - template typename CNetBan::CBan *CNetBan::CBanPool::Get(int Index) const { diff --git a/src/engine/shared/netban.h b/src/engine/shared/netban.h index a93cc7970..447a838d1 100644 --- a/src/engine/shared/netban.h +++ b/src/engine/shared/netban.h @@ -117,7 +117,16 @@ protected: CBan *First() const { return m_pFirstUsed; } CBan *First(const CNetHash *pNetHash) const { return m_paaHashList[pNetHash->m_HashIndex][pNetHash->m_Hash]; } - CBan *Find(const CDataType *pData, const CNetHash *pNetHash) const; + CBan *Find(const CDataType *pData, const CNetHash *pNetHash) const + { + for(CBan *pBan = m_paaHashList[pNetHash->m_HashIndex][pNetHash->m_Hash]; pBan; pBan = pBan->m_pHashNext) + { + if(NetComp(&pBan->m_Data, pData) == 0) + return pBan; + } + + return 0; + } CBan *Get(int Index) const; private: