diff --git a/code/Ratl/bits_vs.h b/code/Ratl/bits_vs.h index d0bde48..aea5d63 100644 --- a/code/Ratl/bits_vs.h +++ b/code/Ratl/bits_vs.h @@ -41,9 +41,9 @@ class bits_vs : public bits_base //////////////////////////////////////////////////////////////////////////////////// void clear_trailing_bits() { - for (int i=SIZE; iARRAY_SIZE*this->BITS_INT_SIZE; i++) { - mV[i>>BITS_SHIFT] &= ~(1<<(i&BITS_AND)); + this->mV[i>>this->BITS_SHIFT] &= ~(1<<(i&this->BITS_AND)); } } @@ -68,7 +68,7 @@ public: //////////////////////////////////////////////////////////////////////////////////// bits_vs(const bits_vs &B) { - mem::cpy(mV, B.mV,BYTE_SIZE); + mem::cpy(this->mV, B.mV,this->BYTE_SIZE); } //////////////////////////////////////////////////////////////////////////////////// @@ -76,7 +76,7 @@ public: //////////////////////////////////////////////////////////////////////////////////// bits_vs(const char* Str) { - clear(); + this->clear(); for (int b=0; bset_bit(b); // Found A True Bit } } } @@ -96,9 +96,9 @@ public: //////////////////////////////////////////////////////////////////////////////////////// bool empty() const { - for (int i=0; iARRAY_SIZE; i++) { - if (mV[i]) + if (this->mV[i]) { return false; } @@ -119,9 +119,9 @@ public: //////////////////////////////////////////////////////////////////////////////////////// void invert() { - for (int i=0; iARRAY_SIZE; i++) { - mV[i] = ~mV[i]; + this->mV[i] = ~this->mV[i]; } clear_trailing_bits(); } @@ -144,7 +144,7 @@ public: // of bits this object can hold. //-------------------------------------------- assert(i>=0 && i < SIZE); - return ( (mV[i>>BITS_SHIFT] & (1<<(i&BITS_AND)))!=0 ); + return ( (this->mV[i>>this->BITS_SHIFT] & (1<<(i&this->BITS_AND)))!=0 ); } //////////////////////////////////////////////////////////////////////////////////////// @@ -160,7 +160,7 @@ public: //////////////////////////////////////////////////////////////////////////////////////// bool operator==(const bits_vs &B) const { - return (mem::eql(mV, B.mV,BYTE_SIZE)); + return (mem::eql(this->mV, B.mV,this->BYTE_SIZE)); } //////////////////////////////////////////////////////////////////////////////////////// @@ -176,9 +176,9 @@ public: //////////////////////////////////////////////////////////////////////////////////////// void operator|=(const bits_vs &B) { - for (int i=0; iARRAY_SIZE; i++) { - mV[i] |= B.mV[i]; + this->mV[i] |= B.mV[i]; } } @@ -187,9 +187,9 @@ public: //////////////////////////////////////////////////////////////////////////////////////// void operator&=(const bits_vs &B) { - for (int i=0; iARRAY_SIZE; i++) { - mV[i] &= B.mV[i]; + this->mV[i] &= B.mV[i]; } } @@ -198,9 +198,9 @@ public: //////////////////////////////////////////////////////////////////////////////////////// void operator^=(const bits_vs &B) { - for (int i=0; iARRAY_SIZE; i++) { - mV[i] ^= B.mV[i]; + this->mV[i] ^= B.mV[i]; } } @@ -209,7 +209,7 @@ public: //////////////////////////////////////////////////////////////////////////////////////// void operator=(const bits_vs &B) { - mem::cpy(mV, B.mV,BYTE_SIZE); + mem::cpy(this->mV, B.mV,this->BYTE_SIZE); } }; diff --git a/code/Ratl/handle_pool_vs.h b/code/Ratl/handle_pool_vs.h index e39701a..f8dcdfc 100644 --- a/code/Ratl/handle_pool_vs.h +++ b/code/Ratl/handle_pool_vs.h @@ -42,7 +42,7 @@ template class handle_pool_base : public pool_root { public: - typedef typename T TStorageTraits; + typedef T TStorageTraits; typedef typename T::TValue TTValue; //////////////////////////////////////////////////////////////////////////////////// // Capacity Enum @@ -121,7 +121,7 @@ public: const TTValue& operator[](int handle) const { assert(is_used(handle)); //typically this is a stale handle (already been freed) - return value_at_index(handle&mMASK_HANDLE_TO_INDEX); + return this->value_at_index(handle&mMASK_HANDLE_TO_INDEX); } //////////////////////////////////////////////////////////////////////////////////// @@ -130,14 +130,14 @@ public: TTValue& operator[](int i) { assert(is_used(i)); //typically this is a stale handle (already been freed) - return value_at_index(i&mMASK_HANDLE_TO_INDEX); + return this->value_at_index(i&mMASK_HANDLE_TO_INDEX); } bool is_used(int i) const { if (mHandles[i&mMASK_HANDLE_TO_INDEX]==i) { - return is_used_index(i&mMASK_HANDLE_TO_INDEX); + return this->is_used_index(i&mMASK_HANDLE_TO_INDEX); } return false; } @@ -157,7 +157,7 @@ public: //////////////////////////////////////////////////////////////////////////////////// int alloc() { - int index=alloc_index(); + int index=this->alloc_index(); return mHandles[index]; } @@ -225,25 +225,25 @@ public: //////////////////////////////////////////////////////////////////////////////////// int pointer_to_handle(const TRatlNew *me) const { - return index_to_handle(pointer_to_index(me)); + return this->index_to_handle(this->pointer_to_index(me)); } //////////////////////////////////////////////////////////////////////////////////// // Get An Iterator To The Object At handle //////////////////////////////////////////////////////////////////////////////////// - pool_root::iterator at(int handle) + typename pool_root::iterator at(int handle) { assert(is_used(handle)); - return at_index(handle&mMASK_HANDLE_TO_INDEX); + return this->at_index(handle&mMASK_HANDLE_TO_INDEX); } //////////////////////////////////////////////////////////////////////////////////// // Get An Iterator To The Object At handle //////////////////////////////////////////////////////////////////////////////////// - pool_root::const_iterator at(int handle) const + typename pool_root::const_iterator at(int handle) const { assert(is_used(handle)); - return at_index(handle&mMASK_HANDLE_TO_INDEX); + return this->at_index(handle&mMASK_HANDLE_TO_INDEX); } }; @@ -288,4 +288,4 @@ public: }; } -#endif \ No newline at end of file +#endif diff --git a/code/Ratl/map_vs.h b/code/Ratl/map_vs.h index ded931e..76926ff 100644 --- a/code/Ratl/map_vs.h +++ b/code/Ratl/map_vs.h @@ -98,7 +98,7 @@ template class tree_base { public: - typedef typename T TStorageTraits; + typedef T TStorageTraits; typedef typename T::TValue TTValue; //////////////////////////////////////////////////////////////////////////////////// // Capacity Enum @@ -831,7 +831,7 @@ class set_base : public tree_base { public: - typedef typename T TStorageTraits; + typedef T TStorageTraits; typedef typename T::TValue TTValue; //////////////////////////////////////////////////////////////////////////////////// // Capacity Enum @@ -850,7 +850,7 @@ public: assert(!IS_MULTI || find_index(key)==tree_node::NULL_NODE); //fixme handle duplicates more sensibly? alloc_key(key); - insert_alloced_key(); + this->insert_alloced_key(); } @@ -859,7 +859,7 @@ public: //////////////////////////////////////////////////////////////////////////////////// TTValue & alloc() { - return alloc_key(); + return this->alloc_key(); } //////////////////////////////////////////////////////////////////////////////////// @@ -867,7 +867,7 @@ public: //////////////////////////////////////////////////////////////////////////////////// TRatlNew *alloc_raw() { - return alloc_key_raw(); + return this->alloc_key_raw(); } template CAST_TO *verify_alloc(CAST_TO *p) const @@ -877,7 +877,7 @@ public: void insert_alloced() { - insert_alloced_key(); + this->insert_alloced_key(); } //////////////////////////////////////////////////////////////////////////////////// @@ -889,7 +889,7 @@ public: int i=find_index(key); if (i!=tree_node::NULL_NODE) { - erase_index(i); + this->erase_index(i); } } @@ -1068,7 +1068,7 @@ public: //////////////////////////////////////////////////////////////////////////////////// iterator begin() { - return iterator(this, front()); + return iterator(this, this->front()); } //////////////////////////////////////////////////////////////////////////////////// @@ -1076,7 +1076,7 @@ public: //////////////////////////////////////////////////////////////////////////////////// iterator rbegin() { - return iterator(this, back()); + return iterator(this, this->back()); } //////////////////////////////////////////////////////////////////////////////////// @@ -1100,7 +1100,7 @@ public: //////////////////////////////////////////////////////////////////////////////////// const_iterator begin() const { - return const_iterator(this, front()); + return const_iterator(this, this->front()); } //////////////////////////////////////////////////////////////////////////////////// @@ -1108,7 +1108,7 @@ public: //////////////////////////////////////////////////////////////////////////////////// const_iterator rbegin() const { - return const_iterator(this, back()); + return const_iterator(this, this->back()); } //////////////////////////////////////////////////////////////////////////////////// @@ -1195,9 +1195,9 @@ template class map_base : public tree_base { public: - typedef typename K TKeyStorageTraits; + typedef K TKeyStorageTraits; typedef typename K::TValue TKTValue; - typedef typename V TValueStorageTraits; + typedef V TValueStorageTraits; typedef typename V::TValue TVTValue; //////////////////////////////////////////////////////////////////////////////////// // Capacity Enum @@ -1226,10 +1226,10 @@ public: { assert(!IS_MULTI || find_index(key)==tree_node::NULL_NODE); //fixme handle duplicates more sensibly? - alloc_key(key); - insert_alloced_key(); + this->alloc_key(key); + this->insert_alloced_key(); assert(check_validity()); - mValues.construct(index_of_alloced_key(),value); + mValues.construct(this->index_of_alloced_key(),value); } //////////////////////////////////////////////////////////////////////////////////// @@ -1241,9 +1241,9 @@ public: assert(!IS_MULTI || find_index(key)==tree_node::NULL_NODE); //fixme handle duplicates more sensibly? alloc_key(key); - insert_alloced_key(); + this->insert_alloced_key(); - int idx=index_of_alloced_key(); + int idx=this->index_of_alloced_key(); assert(check_validity()); mValues.construct(idx); return mValues[idx]; @@ -1257,9 +1257,9 @@ public: assert(!IS_MULTI || find_index(key)==tree_node::NULL_NODE); //fixme handle duplicates more sensibly? alloc_key(key); - insert_alloced_key(); + this->insert_alloced_key(); assert(check_validity()); - return mValues.alloc_raw(index_of_alloced_key()); + return mValues.alloc_raw(this->index_of_alloced_key()); } //////////////////////////////////////////////////////////////////////////////////// @@ -1267,8 +1267,8 @@ public: //////////////////////////////////////////////////////////////////////////////////// TVTValue &alloc_value() { - mValues.construct(index_of_alloced_key()); - return mValues[index_of_alloced_key()]; + mValues.construct(this->index_of_alloced_key()); + return mValues[this->index_of_alloced_key()]; } //////////////////////////////////////////////////////////////////////////////////// @@ -1276,7 +1276,7 @@ public: //////////////////////////////////////////////////////////////////////////////////// TRatlNew *alloc_value_raw() { - return mValues.alloc_raw(index_of_alloced_key()); + return mValues.alloc_raw(this->index_of_alloced_key()); } template @@ -1291,10 +1291,10 @@ public: void erase(const TKTValue &key) { //fixme this is a double search currently - int i=find_index(key); + int i=this->find_index(key); if (i!=tree_node::NULL_NODE) { - erase_index(i); + this->erase_index(i); mValues.destruct(i); } } @@ -1490,7 +1490,7 @@ public: //////////////////////////////////////////////////////////////////////////////////// iterator find(const TKTValue &key) { - return iterator(this,find_index(key)); + return iterator(this,this->find_index(key)); } //////////////////////////////////////////////////////////////////////////////////// @@ -1498,7 +1498,7 @@ public: //////////////////////////////////////////////////////////////////////////////////// iterator begin() { - return iterator(this, front()); + return iterator(this, this->front()); } //////////////////////////////////////////////////////////////////////////////////// @@ -1506,7 +1506,7 @@ public: //////////////////////////////////////////////////////////////////////////////////// iterator rbegin() { - return iterator(this, back()); + return iterator(this, this->back()); } //////////////////////////////////////////////////////////////////////////////////// @@ -1530,7 +1530,7 @@ public: //////////////////////////////////////////////////////////////////////////////////// const_iterator begin() const { - return const_iterator(this, front()); + return const_iterator(this, this->front()); } //////////////////////////////////////////////////////////////////////////////////// @@ -1538,7 +1538,7 @@ public: //////////////////////////////////////////////////////////////////////////////////// const_iterator rbegin() const { - return const_iterator(this, back()); + return const_iterator(this, this->back()); } //////////////////////////////////////////////////////////////////////////////////// diff --git a/code/Ratl/pool_vs.h b/code/Ratl/pool_vs.h index 5cd87bd..4e6fab3 100644 --- a/code/Ratl/pool_vs.h +++ b/code/Ratl/pool_vs.h @@ -40,7 +40,7 @@ template class pool_root : public ratl_base { public: - typedef typename T TStorageTraits; + typedef T TStorageTraits; typedef typename T::TValue TTValue; //////////////////////////////////////////////////////////////////////////////////// // Capacity Enum @@ -461,7 +461,7 @@ public: //////////////////////////////////////////////////////////////////////////////////// const TTValue& operator[](int i) const { - return value_at_index(i); + return this->value_at_index(i); } //////////////////////////////////////////////////////////////////////////////////// @@ -469,12 +469,12 @@ public: //////////////////////////////////////////////////////////////////////////////////// TTValue& operator[](int i) { - return value_at_index(i); + return this->value_at_index(i); } bool is_used(int i) const { - return is_used_index(i); + return this->is_used_index(i); } //////////////////////////////////////////////////////////////////////////////////// @@ -482,7 +482,7 @@ public: //////////////////////////////////////////////////////////////////////////////////// void swap(int i,int j) { - swap_index(i,j); + this->swap_index(i,j); } //////////////////////////////////////////////////////////////////////////////////// @@ -490,7 +490,7 @@ public: //////////////////////////////////////////////////////////////////////////////////// int alloc() { - return alloc_index(); + return this->alloc_index(); } //////////////////////////////////////////////////////////////////////////////////// @@ -498,7 +498,7 @@ public: //////////////////////////////////////////////////////////////////////////////////// int alloc(const TTValue &v) { - return alloc_index(v); + return this->alloc_index(v); } //////////////////////////////////////////////////////////////////////////////////// @@ -506,23 +506,23 @@ public: //////////////////////////////////////////////////////////////////////////////////// void free(int i) { - free_index(i); + this->free_index(i); } //////////////////////////////////////////////////////////////////////////////////// // Get An Iterator To The Object At index //////////////////////////////////////////////////////////////////////////////////// - pool_root::iterator at(int index) + typename pool_root::iterator at(int index) { - return at_index(index); + return this->at_index(index); } //////////////////////////////////////////////////////////////////////////////////// // Get An Iterator To The Object At index //////////////////////////////////////////////////////////////////////////////////// - pool_root::const_iterator at(int index) const + typename pool_root::const_iterator at(int index) const { - return at_index(index); + return this->at_index(index); } }; @@ -567,4 +567,4 @@ public: }; } -#endif \ No newline at end of file +#endif diff --git a/code/Ratl/queue_vs.h b/code/Ratl/queue_vs.h index 31e6e0a..4169d52 100644 --- a/code/Ratl/queue_vs.h +++ b/code/Ratl/queue_vs.h @@ -41,7 +41,7 @@ template class queue_base : public ratl_base { public: - typedef typename T TStorageTraits; + typedef T TStorageTraits; typedef typename T::TValue TTValue; //////////////////////////////////////////////////////////////////////////////////// // Capacity Enum @@ -81,7 +81,6 @@ private: public: - typedef T TStorageTraits; //////////////////////////////////////////////////////////////////////////////////// // Constructor diff --git a/code/Ratl/ratl_common.h b/code/Ratl/ratl_common.h index 9f55f14..357f2b7 100644 --- a/code/Ratl/ratl_common.h +++ b/code/Ratl/ratl_common.h @@ -1032,7 +1032,7 @@ public: //////////////////////////////////////////////////////////////////////////////////// // Data //////////////////////////////////////////////////////////////////////////////////// - typedef typename T TStorageTraits; + typedef T TStorageTraits; typedef typename T::TArray TTArray; typedef typename T::TValue TTValue; typedef typename T::TConstructed TTConstructed; diff --git a/code/Ratl/stack_vs.h b/code/Ratl/stack_vs.h index 215a2a3..9bfb5e9 100644 --- a/code/Ratl/stack_vs.h +++ b/code/Ratl/stack_vs.h @@ -36,7 +36,7 @@ template class stack_base : public ratl_base { public: - typedef typename T TStorageTraits; + typedef T TStorageTraits; typedef typename T::TValue TTValue; //////////////////////////////////////////////////////////////////////////////////// // Capacity Enum diff --git a/code/Ratl/vector_vs.h b/code/Ratl/vector_vs.h index 5c33175..a9d18d3 100644 --- a/code/Ratl/vector_vs.h +++ b/code/Ratl/vector_vs.h @@ -38,7 +38,7 @@ template class vector_base : public ratl_base { public: - typedef typename T TStorageTraits; + typedef T TStorageTraits; typedef typename T::TValue TTValue; //////////////////////////////////////////////////////////////////////////////////// // Capacity Enum @@ -69,7 +69,7 @@ public: { mArray[i] = B.mArray[i]; } - mSize = val.mSize; + mSize = B.mSize; } ////////////////////////////////////////////////////////////////////////////////////