mirror of
https://github.com/alliedmodders/metamod-source.git
synced 2025-02-12 06:54:31 +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,7 +20,7 @@ namespace SourceHook
|
|||||||
|
|
||||||
template <class T> class CStack
|
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
|
||||||
|
|
||||||
@ -28,7 +28,8 @@ namespace SourceHook
|
|||||||
|
|
||||||
void clear()
|
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;
|
delete [] *sect_iter;
|
||||||
}
|
}
|
||||||
@ -114,7 +115,7 @@ namespace SourceHook
|
|||||||
|
|
||||||
CStack(const CStack &other)
|
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)
|
sect_iter != other.m_Sectors.end(); ++sect_iter)
|
||||||
{
|
{
|
||||||
m_Sectors.push_back(new T[SECTOR_SIZE]);
|
m_Sectors.push_back(new T[SECTOR_SIZE]);
|
||||||
@ -127,7 +128,7 @@ namespace SourceHook
|
|||||||
CStack & operator =(const CStack &other)
|
CStack & operator =(const CStack &other)
|
||||||
{
|
{
|
||||||
clear();
|
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)
|
sect_iter != other.m_Sectors.end(); ++sect_iter)
|
||||||
{
|
{
|
||||||
m_Sectors.push_back(new T[SECTOR_SIZE]);
|
m_Sectors.push_back(new T[SECTOR_SIZE]);
|
||||||
|
@ -103,3 +103,4 @@ namespace SourceHook
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -78,3 +78,4 @@ namespace SourceHook
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -109,3 +109,4 @@ namespace SourceHook
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -158,3 +158,4 @@ namespace SourceHook
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -78,3 +78,4 @@ namespace SourceHook
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -74,3 +74,4 @@ namespace SourceHook
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -89,3 +89,4 @@ namespace SourceHook
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user