PM: Added 64bit compatibility

dvander: Fixed minor bugs
This commit is contained in:
David Anderson
2004-07-23 16:55:53 +00:00
parent 8e8633a49a
commit 6dc00f64f8
13 changed files with 86 additions and 85 deletions

View File

@@ -90,6 +90,7 @@ protected:
T *m_Data;
size_t m_Size;
size_t m_CurrentUsedSize;
size_t m_CurrentSize;
public:
class iterator
{
@@ -397,7 +398,7 @@ public:
if (where != m_Data)
--where;
// validate iter
if (where < m_Data || where >= (m_Data + m_CurrentSize))
if (where < m_Data || where >= (m_Data + m_CurrentUsedSize))
return false;
++m_CurrentUsedSize;
@@ -415,7 +416,7 @@ public:
void erase(iterator where)
{
// validate iter
if (where < m_Data || where >= (m_Data + m_CurrentSize))
if (where < m_Data || where >= (m_Data + m_CurrentUsedSize))
return false;
if (m_CurrentUsedSize > 1)
@@ -437,4 +438,5 @@ public:
}
};
#endif // __CVECTOR_H__
#endif // __CVECTOR_H__