sourcehook/sh_stack.h
changeset 381 8eded451c936
parent 380 f9e21a2ac558
child 523 6f1630519b81
     1.1 --- a/sourcehook/sh_stack.h	Sun Oct 07 22:10:07 2007 +0000
     1.2 +++ b/sourcehook/sh_stack.h	Sun Oct 07 22:24:01 2007 +0000
     1.3 @@ -20,15 +20,16 @@
     1.4  
     1.5  	template <class T> class CStack
     1.6  	{
     1.7 -		static const int SECTOR_SIZE = 16;
     1.8 +		static const size_t SECTOR_SIZE = 16;
     1.9  
    1.10 -		CVector<T *> m_Sectors;				// Stores sectors
    1.11 +		CVector<T*> m_Sectors;				// Stores sectors
    1.12  
    1.13  		size_t m_UsedSize;
    1.14  
    1.15  		void clear()
    1.16  		{
    1.17 -			for (CVector<T*>::iterator sect_iter = m_Sectors.begin(); sect_iter != m_Sectors.end(); ++sect_iter)
    1.18 +			typename CVector<T*>::iterator sect_iter;
    1.19 +			for (sect_iter = m_Sectors.begin(); sect_iter != m_Sectors.end(); ++sect_iter)
    1.20  			{
    1.21  				delete [] *sect_iter;
    1.22  			}
    1.23 @@ -114,7 +115,7 @@
    1.24  
    1.25  		CStack(const CStack &other)
    1.26  		{
    1.27 -			for (CVector<T*>::iterator sect_iter = other.m_Sectors.begin();
    1.28 +			for (typename CVector<T*>::iterator sect_iter = other.m_Sectors.begin();
    1.29  				sect_iter != other.m_Sectors.end(); ++sect_iter)
    1.30  			{
    1.31  				m_Sectors.push_back(new T[SECTOR_SIZE]);
    1.32 @@ -127,7 +128,7 @@
    1.33  		CStack & operator =(const CStack &other)
    1.34  		{
    1.35  			clear();
    1.36 -			for (CVector<T*>::iterator sect_iter = other.m_Sectors.begin();
    1.37 +			for (typename CVector<T*>::iterator sect_iter = other.m_Sectors.begin();
    1.38  				sect_iter != other.m_Sectors.end(); ++sect_iter)
    1.39  			{
    1.40  				m_Sectors.push_back(new T[SECTOR_SIZE]);