mirror of
https://github.com/alliedmodders/metamod-source.git
synced 2025-01-30 19:52:17 +01:00
linux.gcc compat
--HG-- extra : convert_revision : svn%3Ac2935e3e-5518-0410-8daf-afa5dab7d4e3/trunk%40466
This commit is contained in:
parent
47984a6cb3
commit
7fdf6be5ac
@ -20,15 +20,16 @@ namespace SourceHook
|
||||
|
||||
template <class T> class CStack
|
||||
{
|
||||
static const int SECTOR_SIZE = 16;
|
||||
static const size_t SECTOR_SIZE = 16;
|
||||
|
||||
CVector<T *> m_Sectors; // Stores sectors
|
||||
CVector<T*> m_Sectors; // Stores sectors
|
||||
|
||||
size_t m_UsedSize;
|
||||
|
||||
void clear()
|
||||
{
|
||||
for (CVector<T*>::iterator sect_iter = m_Sectors.begin(); sect_iter != m_Sectors.end(); ++sect_iter)
|
||||
typename CVector<T*>::iterator sect_iter;
|
||||
for (sect_iter = m_Sectors.begin(); sect_iter != m_Sectors.end(); ++sect_iter)
|
||||
{
|
||||
delete [] *sect_iter;
|
||||
}
|
||||
@ -114,7 +115,7 @@ namespace SourceHook
|
||||
|
||||
CStack(const CStack &other)
|
||||
{
|
||||
for (CVector<T*>::iterator sect_iter = other.m_Sectors.begin();
|
||||
for (typename CVector<T*>::iterator sect_iter = other.m_Sectors.begin();
|
||||
sect_iter != other.m_Sectors.end(); ++sect_iter)
|
||||
{
|
||||
m_Sectors.push_back(new T[SECTOR_SIZE]);
|
||||
@ -127,7 +128,7 @@ namespace SourceHook
|
||||
CStack & operator =(const CStack &other)
|
||||
{
|
||||
clear();
|
||||
for (CVector<T*>::iterator sect_iter = other.m_Sectors.begin();
|
||||
for (typename CVector<T*>::iterator sect_iter = other.m_Sectors.begin();
|
||||
sect_iter != other.m_Sectors.end(); ++sect_iter)
|
||||
{
|
||||
m_Sectors.push_back(new T[SECTOR_SIZE]);
|
||||
|
@ -102,4 +102,5 @@ namespace SourceHook
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -77,4 +77,5 @@ namespace SourceHook
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -108,4 +108,5 @@ namespace SourceHook
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -157,4 +157,5 @@ namespace SourceHook
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -77,4 +77,5 @@ namespace SourceHook
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -74,3 +74,4 @@ namespace SourceHook
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -88,4 +88,5 @@ namespace SourceHook
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user