Removed comments and protected
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
diff --git a/include/FTVector.h b/include/FTVector.h
index 97def2a..0dc4ed1 100644
--- a/include/FTVector.h
+++ b/include/FTVector.h
@@ -31,9 +31,6 @@ class FTGL_EXPORT FTVector
FTVector& operator =(const FTVector& v)
{
- // Warning: the vector is not cleared and resized to v capacity for
- // efficiency reasons.
- // clear();
reserve(v.capacity());
iterator ptr = begin();
@@ -153,10 +150,9 @@ class FTGL_EXPORT FTVector
}
- protected:
+ private:
void expand(size_type capacity_hint = 0)
{
- // Allocate new vector( capacity doubles)
size_type new_capacity =( capacity() == 0) ? 256 : capacity()* 2;
if( capacity_hint)
{
@@ -168,7 +164,6 @@ class FTGL_EXPORT FTVector
value_type *new_items = new value_type[new_capacity];
- // Copy values to new vector
iterator begin = this->begin();
iterator end = this->end();
value_type *ptr = new_items;
@@ -178,7 +173,6 @@ class FTGL_EXPORT FTVector
*ptr++ = *begin++;
}
- // Deallocate old vector and use new vector
if( Capacity)
{
delete [] Items;
@@ -188,8 +182,6 @@ class FTGL_EXPORT FTVector
Capacity = new_capacity;
}
-
- private:
size_type Capacity;
size_type Size;
value_type* Items;