1
0
mirror of https://github.com/alliedmodders/metamod-source.git synced 2025-01-30 19:52:17 +01:00

Fixed operator overload bug in List

Fixed memory leak in TinyHash

--HG--
extra : convert_revision : svn%3Ac2935e3e-5518-0410-8daf-afa5dab7d4e3/trunk%40151
This commit is contained in:
David Anderson 2005-12-06 03:13:50 +00:00
parent 52c5031598
commit 6875cd1f74
2 changed files with 9 additions and 1 deletions

View File

@ -254,7 +254,7 @@ public:
}
return end();
}
List & operator =(List &src)
List & operator =(const List &src)
{
clear();
iterator iter;

View File

@ -86,10 +86,18 @@ namespace SourceHook
private:
void _Clear()
{
typename List<THashNode *>::iterator iter, end;
for (size_t i=0; i<m_numBuckets; i++)
{
if (m_Buckets[i])
{
end = m_Buckets[i]->end();
iter = m_Buckets[i]->begin();
while (iter != end)
{
delete (*iter);
iter++;
}
delete m_Buckets[i];
m_Buckets[i] = NULL;
}