From 7fdf6be5ac38d02ff3a29b523285585c00eb01b6 Mon Sep 17 00:00:00 2001 From: Pavol Marko Date: Sun, 7 Oct 2007 22:24:01 +0000 Subject: [PATCH] linux.gcc compat --HG-- extra : convert_revision : svn%3Ac2935e3e-5518-0410-8daf-afa5dab7d4e3/trunk%40466 --- sourcehook/sh_stack.h | 11 ++++++----- sourcehook/sourcehook_impl_chook.h | 3 ++- sourcehook/sourcehook_impl_chookidman.h | 3 ++- sourcehook/sourcehook_impl_chookmancont.h | 3 ++- sourcehook/sourcehook_impl_chookmaninfo.h | 3 ++- sourcehook/sourcehook_impl_ciface.h | 3 ++- sourcehook/sourcehook_impl_cproto.h | 1 + sourcehook/sourcehook_impl_cvfnptr.h | 3 ++- 8 files changed, 19 insertions(+), 11 deletions(-) diff --git a/sourcehook/sh_stack.h b/sourcehook/sh_stack.h index c6b5885..c94cfd2 100644 --- a/sourcehook/sh_stack.h +++ b/sourcehook/sh_stack.h @@ -20,15 +20,16 @@ namespace SourceHook template class CStack { - static const int SECTOR_SIZE = 16; + static const size_t SECTOR_SIZE = 16; - CVector m_Sectors; // Stores sectors + CVector m_Sectors; // Stores sectors size_t m_UsedSize; void clear() { - for (CVector::iterator sect_iter = m_Sectors.begin(); sect_iter != m_Sectors.end(); ++sect_iter) + typename CVector::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::iterator sect_iter = other.m_Sectors.begin(); + for (typename CVector::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::iterator sect_iter = other.m_Sectors.begin(); + for (typename CVector::iterator sect_iter = other.m_Sectors.begin(); sect_iter != other.m_Sectors.end(); ++sect_iter) { m_Sectors.push_back(new T[SECTOR_SIZE]); diff --git a/sourcehook/sourcehook_impl_chook.h b/sourcehook/sourcehook_impl_chook.h index 588133c..db00e5b 100644 --- a/sourcehook/sourcehook_impl_chook.h +++ b/sourcehook/sourcehook_impl_chook.h @@ -102,4 +102,5 @@ namespace SourceHook } } -#endif \ No newline at end of file +#endif + diff --git a/sourcehook/sourcehook_impl_chookidman.h b/sourcehook/sourcehook_impl_chookidman.h index 87101ad..cb17da3 100644 --- a/sourcehook/sourcehook_impl_chookidman.h +++ b/sourcehook/sourcehook_impl_chookidman.h @@ -77,4 +77,5 @@ namespace SourceHook } } -#endif \ No newline at end of file +#endif + diff --git a/sourcehook/sourcehook_impl_chookmancont.h b/sourcehook/sourcehook_impl_chookmancont.h index e70dccb..6c7e888 100644 --- a/sourcehook/sourcehook_impl_chookmancont.h +++ b/sourcehook/sourcehook_impl_chookmancont.h @@ -108,4 +108,5 @@ namespace SourceHook } } -#endif \ No newline at end of file +#endif + diff --git a/sourcehook/sourcehook_impl_chookmaninfo.h b/sourcehook/sourcehook_impl_chookmaninfo.h index 8f12e75..4d26679 100644 --- a/sourcehook/sourcehook_impl_chookmaninfo.h +++ b/sourcehook/sourcehook_impl_chookmaninfo.h @@ -157,4 +157,5 @@ namespace SourceHook } } -#endif \ No newline at end of file +#endif + diff --git a/sourcehook/sourcehook_impl_ciface.h b/sourcehook/sourcehook_impl_ciface.h index 2f0e432..482dd7c 100644 --- a/sourcehook/sourcehook_impl_ciface.h +++ b/sourcehook/sourcehook_impl_ciface.h @@ -77,4 +77,5 @@ namespace SourceHook } } -#endif \ No newline at end of file +#endif + diff --git a/sourcehook/sourcehook_impl_cproto.h b/sourcehook/sourcehook_impl_cproto.h index 842486e..a0d0cab 100644 --- a/sourcehook/sourcehook_impl_cproto.h +++ b/sourcehook/sourcehook_impl_cproto.h @@ -74,3 +74,4 @@ namespace SourceHook } #endif + diff --git a/sourcehook/sourcehook_impl_cvfnptr.h b/sourcehook/sourcehook_impl_cvfnptr.h index 3aaf4e4..cdeb1ac 100644 --- a/sourcehook/sourcehook_impl_cvfnptr.h +++ b/sourcehook/sourcehook_impl_cvfnptr.h @@ -88,4 +88,5 @@ namespace SourceHook } } -#endif \ No newline at end of file +#endif +