fixed linking for older gcc versions

This commit is contained in:
oy 2012-01-04 01:19:54 +01:00
parent 8e571a43ac
commit f14c0e2359
2 changed files with 10 additions and 13 deletions

View file

@ -224,18 +224,6 @@ void CNetBan::CBanPool<T, HashCount>::Reset()
m_pFirstFree = &m_aBans[0];
}
template<class T, int HashCount>
typename CNetBan::CBan<T> *CNetBan::CBanPool<T, HashCount>::Find(const T *pData, const CNetHash *pNetHash) const
{
for(CBan<T> *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<class T, int HashCount>
typename CNetBan::CBan<T> *CNetBan::CBanPool<T, HashCount>::Get(int Index) const
{

View file

@ -117,7 +117,16 @@ protected:
CBan<CDataType> *First() const { return m_pFirstUsed; }
CBan<CDataType> *First(const CNetHash *pNetHash) const { return m_paaHashList[pNetHash->m_HashIndex][pNetHash->m_Hash]; }
CBan<CDataType> *Find(const CDataType *pData, const CNetHash *pNetHash) const;
CBan<CDataType> *Find(const CDataType *pData, const CNetHash *pNetHash) const
{
for(CBan<CDataType> *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<CDataType> *Get(int Index) const;
private: