1
0
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:
Pavol Marko 2007-10-07 22:24:01 +00:00
parent 47984a6cb3
commit 7fdf6be5ac
8 changed files with 19 additions and 11 deletions

View File

@ -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]);

View File

@ -102,4 +102,5 @@ namespace SourceHook
}
}
#endif
#endif

View File

@ -77,4 +77,5 @@ namespace SourceHook
}
}
#endif
#endif

View File

@ -108,4 +108,5 @@ namespace SourceHook
}
}
#endif
#endif

View File

@ -157,4 +157,5 @@ namespace SourceHook
}
}
#endif
#endif

View File

@ -77,4 +77,5 @@ namespace SourceHook
}
}
#endif
#endif

View File

@ -74,3 +74,4 @@ namespace SourceHook
}
#endif

View File

@ -88,4 +88,5 @@ namespace SourceHook
}
}
#endif
#endif