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:
parent
52c5031598
commit
6875cd1f74
@ -254,7 +254,7 @@ public:
|
||||
}
|
||||
return end();
|
||||
}
|
||||
List & operator =(List &src)
|
||||
List & operator =(const List &src)
|
||||
{
|
||||
clear();
|
||||
iterator iter;
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user