Browse Source

Fix 32-bit Windows compilation issues with Eigen

rdb 11 years ago
parent
commit
e9a64736a3

+ 1 - 1
dtool/src/interrogate/interrogate_module.cxx

@@ -112,7 +112,7 @@ int write_python_table_native(ostream &out) {
   pset<std::string >::iterator ii;
   for(ii = libraries.begin(); ii != libraries.end(); ii++) {
     printf("Referencing Library %s\n", (*ii).c_str());
-    out << "IMPORT_THIS LibraryDef " << *ii << "_moddef;\n";
+    out << "extern LibraryDef " << *ii << "_moddef;\n";
   }
 
   out << "\n"

+ 4 - 4
panda/src/display/displayRegion.cxx

@@ -636,7 +636,7 @@ void DisplayRegion::
 compute_pixels() {
   if (_window != (GraphicsOutput *)NULL) {
     CDWriter cdata(_cycler, false);
-    for (int i = 0; i < cdata->_regions.size(); ++i) {
+    for (size_t i = 0; i < cdata->_regions.size(); ++i) {
       do_compute_pixels(i, _window->get_fb_x_size(), _window->get_fb_y_size(), 
                         cdata);
     }
@@ -658,7 +658,7 @@ compute_pixels_all_stages() {
   if (_window != (GraphicsOutput *)NULL) {
     OPEN_ITERATE_ALL_STAGES(_cycler) {
       CDStageWriter cdata(_cycler, pipeline_stage);
-      for (int i = 0; i < cdata->_regions.size(); ++i) {
+      for (size_t i = 0; i < cdata->_regions.size(); ++i) {
         do_compute_pixels(i, _window->get_fb_x_size(), _window->get_fb_y_size(), 
                           cdata);
       }
@@ -677,7 +677,7 @@ compute_pixels_all_stages() {
 void DisplayRegion::
 compute_pixels(int x_size, int y_size) {
   CDWriter cdata(_cycler, false);
-  for (int i = 0; i < cdata->_regions.size(); ++i) {
+  for (size_t i = 0; i < cdata->_regions.size(); ++i) {
     do_compute_pixels(i, x_size, y_size, cdata);
   }
 }
@@ -695,7 +695,7 @@ void DisplayRegion::
 compute_pixels_all_stages(int x_size, int y_size) {
   OPEN_ITERATE_ALL_STAGES(_cycler) {
     CDStageWriter cdata(_cycler, pipeline_stage);
-    for (int i = 0; i < cdata->_regions.size(); ++i) {
+    for (size_t i = 0; i < cdata->_regions.size(); ++i) {
       do_compute_pixels(i, x_size, y_size, cdata);
     }
   } 

+ 194 - 194
panda/src/express/ordered_vector.I

@@ -18,8 +18,8 @@
 //       Access: Public
 //  Description: 
 ////////////////////////////////////////////////////////////////////
-template<class Key, class Compare>
-INLINE ordered_vector<Key, Compare>::
+template<class Key, class Compare, class Vector>
+INLINE ordered_vector<Key, Compare, Vector>::
 ordered_vector(TypeHandle type_handle) :
   _compare(Compare()),
   _vector(type_handle)
@@ -31,8 +31,8 @@ ordered_vector(TypeHandle type_handle) :
 //       Access: Public
 //  Description: 
 ////////////////////////////////////////////////////////////////////
-template<class Key, class Compare>
-INLINE ordered_vector<Key, Compare>::
+template<class Key, class Compare, class Vector>
+INLINE ordered_vector<Key, Compare, Vector>::
 ordered_vector(const Compare &compare, TypeHandle type_handle) :
   _compare(compare),
   _vector(type_handle)
@@ -44,9 +44,9 @@ ordered_vector(const Compare &compare, TypeHandle type_handle) :
 //       Access: Public
 //  Description: 
 ////////////////////////////////////////////////////////////////////
-template<class Key, class Compare>
-INLINE ordered_vector<Key, Compare>::
-ordered_vector(const ordered_vector<Key, Compare> &copy) :
+template<class Key, class Compare, class Vector>
+INLINE ordered_vector<Key, Compare, Vector>::
+ordered_vector(const ordered_vector<Key, Compare, Vector> &copy) :
   _compare(copy._compare),
   _vector(copy._vector)
 {
@@ -57,9 +57,9 @@ ordered_vector(const ordered_vector<Key, Compare> &copy) :
 //       Access: Public
 //  Description: 
 ////////////////////////////////////////////////////////////////////
-template<class Key, class Compare>
-INLINE ordered_vector<Key, Compare> &ordered_vector<Key, Compare>::
-operator = (const ordered_vector<Key, Compare> &copy) {
+template<class Key, class Compare, class Vector>
+INLINE ordered_vector<Key, Compare, Vector> &ordered_vector<Key, Compare, Vector>::
+operator = (const ordered_vector<Key, Compare, Vector> &copy) {
   _compare = copy._compare;
   _vector = copy._vector;
   return *this;
@@ -70,8 +70,8 @@ operator = (const ordered_vector<Key, Compare> &copy) {
 //       Access: Public
 //  Description: 
 ////////////////////////////////////////////////////////////////////
-template<class Key, class Compare>
-INLINE ordered_vector<Key, Compare>::
+template<class Key, class Compare, class Vector>
+INLINE ordered_vector<Key, Compare, Vector>::
 ~ordered_vector() {
 }
 
@@ -81,8 +81,8 @@ INLINE ordered_vector<Key, Compare>::
 //  Description: Returns the iterator that marks the first element in
 //               the ordered vector.
 ////////////////////////////////////////////////////////////////////
-template<class Key, class Compare>
-INLINE TYPENAME ordered_vector<Key, Compare>::ITERATOR ordered_vector<Key, Compare>::
+template<class Key, class Compare, class Vector>
+INLINE TYPENAME ordered_vector<Key, Compare, Vector>::ITERATOR ordered_vector<Key, Compare, Vector>::
 begin() {
   return _vector.begin();
 }
@@ -93,8 +93,8 @@ begin() {
 //  Description: Returns the iterator that marks the end of the
 //               ordered vector.
 ////////////////////////////////////////////////////////////////////
-template<class Key, class Compare>
-INLINE TYPENAME ordered_vector<Key, Compare>::ITERATOR ordered_vector<Key, Compare>::
+template<class Key, class Compare, class Vector>
+INLINE TYPENAME ordered_vector<Key, Compare, Vector>::ITERATOR ordered_vector<Key, Compare, Vector>::
 end() {
   return _vector.end();
 }
@@ -105,8 +105,8 @@ end() {
 //  Description: Returns the iterator that marks the first element in
 //               the ordered vector, when viewed in reverse order.
 ////////////////////////////////////////////////////////////////////
-template<class Key, class Compare>
-INLINE TYPENAME ordered_vector<Key, Compare>::REVERSE_ITERATOR ordered_vector<Key, Compare>::
+template<class Key, class Compare, class Vector>
+INLINE TYPENAME ordered_vector<Key, Compare, Vector>::REVERSE_ITERATOR ordered_vector<Key, Compare, Vector>::
 rbegin() {
   return _vector.rbegin();
 }
@@ -117,8 +117,8 @@ rbegin() {
 //  Description: Returns the iterator that marks the end of the
 //               ordered vector, when viewed in reverse order.
 ////////////////////////////////////////////////////////////////////
-template<class Key, class Compare>
-INLINE TYPENAME ordered_vector<Key, Compare>::REVERSE_ITERATOR ordered_vector<Key, Compare>::
+template<class Key, class Compare, class Vector>
+INLINE TYPENAME ordered_vector<Key, Compare, Vector>::REVERSE_ITERATOR ordered_vector<Key, Compare, Vector>::
 rend() {
   return _vector.rend();
 }
@@ -129,8 +129,8 @@ rend() {
 //  Description: Returns the iterator that marks the first element in
 //               the ordered vector.
 ////////////////////////////////////////////////////////////////////
-template<class Key, class Compare>
-INLINE TYPENAME ordered_vector<Key, Compare>::CONST_ITERATOR ordered_vector<Key, Compare>::
+template<class Key, class Compare, class Vector>
+INLINE TYPENAME ordered_vector<Key, Compare, Vector>::CONST_ITERATOR ordered_vector<Key, Compare, Vector>::
 begin() const {
   return _vector.begin();
 }
@@ -141,8 +141,8 @@ begin() const {
 //  Description: Returns the iterator that marks the end of the
 //               ordered vector.
 ////////////////////////////////////////////////////////////////////
-template<class Key, class Compare>
-INLINE TYPENAME ordered_vector<Key, Compare>::CONST_ITERATOR ordered_vector<Key, Compare>::
+template<class Key, class Compare, class Vector>
+INLINE TYPENAME ordered_vector<Key, Compare, Vector>::CONST_ITERATOR ordered_vector<Key, Compare, Vector>::
 end() const {
   return _vector.end();
 }
@@ -153,8 +153,8 @@ end() const {
 //  Description: Returns the iterator that marks the first element in
 //               the ordered vector, when viewed in reverse order.
 ////////////////////////////////////////////////////////////////////
-template<class Key, class Compare>
-INLINE TYPENAME ordered_vector<Key, Compare>::CONST_REVERSE_ITERATOR ordered_vector<Key, Compare>::
+template<class Key, class Compare, class Vector>
+INLINE TYPENAME ordered_vector<Key, Compare, Vector>::CONST_REVERSE_ITERATOR ordered_vector<Key, Compare, Vector>::
 rbegin() const {
   return _vector.rbegin();
 }
@@ -165,8 +165,8 @@ rbegin() const {
 //  Description: Returns the iterator that marks the end of the
 //               ordered vector, when viewed in reverse order.
 ////////////////////////////////////////////////////////////////////
-template<class Key, class Compare>
-INLINE TYPENAME ordered_vector<Key, Compare>::CONST_REVERSE_ITERATOR ordered_vector<Key, Compare>::
+template<class Key, class Compare, class Vector>
+INLINE TYPENAME ordered_vector<Key, Compare, Vector>::CONST_REVERSE_ITERATOR ordered_vector<Key, Compare, Vector>::
 rend() const {
   return _vector.rend();
 }
@@ -176,9 +176,9 @@ rend() const {
 //       Access: Public
 //  Description: Returns the nth element.
 ////////////////////////////////////////////////////////////////////
-template<class Key, class Compare>
-INLINE TYPENAME ordered_vector<Key, Compare>::REFERENCE ordered_vector<Key, Compare>::
-operator [] (TYPENAME ordered_vector<Key, Compare>::SIZE_TYPE n) {
+template<class Key, class Compare, class Vector>
+INLINE TYPENAME ordered_vector<Key, Compare, Vector>::REFERENCE ordered_vector<Key, Compare, Vector>::
+operator [] (TYPENAME ordered_vector<Key, Compare, Vector>::SIZE_TYPE n) {
   return _vector[n];
 }
 
@@ -187,9 +187,9 @@ operator [] (TYPENAME ordered_vector<Key, Compare>::SIZE_TYPE n) {
 //       Access: Public
 //  Description: Returns the nth element.
 ////////////////////////////////////////////////////////////////////
-template<class Key, class Compare>
-INLINE TYPENAME ordered_vector<Key, Compare>::CONST_REFERENCE ordered_vector<Key, Compare>::
-operator [] (TYPENAME ordered_vector<Key, Compare>::SIZE_TYPE n) const {
+template<class Key, class Compare, class Vector>
+INLINE TYPENAME ordered_vector<Key, Compare, Vector>::CONST_REFERENCE ordered_vector<Key, Compare, Vector>::
+operator [] (TYPENAME ordered_vector<Key, Compare, Vector>::SIZE_TYPE n) const {
   return _vector[n];
 }
 
@@ -198,8 +198,8 @@ operator [] (TYPENAME ordered_vector<Key, Compare>::SIZE_TYPE n) const {
 //       Access: Public
 //  Description: Returns the number of elements in the ordered vector.
 ////////////////////////////////////////////////////////////////////
-template<class Key, class Compare>
-INLINE TYPENAME ordered_vector<Key, Compare>::SIZE_TYPE ordered_vector<Key, Compare>::
+template<class Key, class Compare, class Vector>
+INLINE TYPENAME ordered_vector<Key, Compare, Vector>::SIZE_TYPE ordered_vector<Key, Compare, Vector>::
 size() const {
   return _vector.size();
 }
@@ -210,8 +210,8 @@ size() const {
 //  Description: Returns the maximum number of elements that can
 //               possibly be stored in an ordered vector.
 ////////////////////////////////////////////////////////////////////
-template<class Key, class Compare>
-INLINE TYPENAME ordered_vector<Key, Compare>::SIZE_TYPE ordered_vector<Key, Compare>::
+template<class Key, class Compare, class Vector>
+INLINE TYPENAME ordered_vector<Key, Compare, Vector>::SIZE_TYPE ordered_vector<Key, Compare, Vector>::
 max_size() const {
   return _vector.max_size();
 }
@@ -222,8 +222,8 @@ max_size() const {
 //  Description: Returns true if the ordered vector is empty, false
 //               otherwise.
 ////////////////////////////////////////////////////////////////////
-template<class Key, class Compare>
-INLINE bool ordered_vector<Key, Compare>::
+template<class Key, class Compare, class Vector>
+INLINE bool ordered_vector<Key, Compare, Vector>::
 empty() const {
   return _vector.empty();
 }
@@ -234,9 +234,9 @@ empty() const {
 //  Description: Returns true if the two ordered vectors are
 //               memberwise equivalent, false otherwise.
 ////////////////////////////////////////////////////////////////////
-template<class Key, class Compare>
-INLINE bool ordered_vector<Key, Compare>::
-operator == (const ordered_vector<Key, Compare> &other) const {
+template<class Key, class Compare, class Vector>
+INLINE bool ordered_vector<Key, Compare, Vector>::
+operator == (const ordered_vector<Key, Compare, Vector> &other) const {
   return _vector == other._vector;
 }
 
@@ -246,9 +246,9 @@ operator == (const ordered_vector<Key, Compare> &other) const {
 //  Description: Returns true if the two ordered vectors are not
 //               memberwise equivalent, false if they are.
 ////////////////////////////////////////////////////////////////////
-template<class Key, class Compare>
-INLINE bool ordered_vector<Key, Compare>::
-operator != (const ordered_vector<Key, Compare> &other) const {
+template<class Key, class Compare, class Vector>
+INLINE bool ordered_vector<Key, Compare, Vector>::
+operator != (const ordered_vector<Key, Compare, Vector> &other) const {
   return _vector != other._vector;
 }
 
@@ -259,9 +259,9 @@ operator != (const ordered_vector<Key, Compare> &other) const {
 //               lexicographically before the other one, false
 //               otherwise.
 ////////////////////////////////////////////////////////////////////
-template<class Key, class Compare>
-INLINE bool ordered_vector<Key, Compare>::
-operator < (const ordered_vector<Key, Compare> &other) const {
+template<class Key, class Compare, class Vector>
+INLINE bool ordered_vector<Key, Compare, Vector>::
+operator < (const ordered_vector<Key, Compare, Vector> &other) const {
   return _vector < other._vector;
 }
 
@@ -272,9 +272,9 @@ operator < (const ordered_vector<Key, Compare> &other) const {
 //               lexicographically after the other one, false
 //               otherwise.
 ////////////////////////////////////////////////////////////////////
-template<class Key, class Compare>
-INLINE bool ordered_vector<Key, Compare>::
-operator > (const ordered_vector<Key, Compare> &other) const {
+template<class Key, class Compare, class Vector>
+INLINE bool ordered_vector<Key, Compare, Vector>::
+operator > (const ordered_vector<Key, Compare, Vector> &other) const {
   return _vector > other._vector;
 }
 
@@ -285,9 +285,9 @@ operator > (const ordered_vector<Key, Compare> &other) const {
 //               lexicographically before the other one or is
 //               equivalent, false otherwise.
 ////////////////////////////////////////////////////////////////////
-template<class Key, class Compare>
-INLINE bool ordered_vector<Key, Compare>::
-operator <= (const ordered_vector<Key, Compare> &other) const {
+template<class Key, class Compare, class Vector>
+INLINE bool ordered_vector<Key, Compare, Vector>::
+operator <= (const ordered_vector<Key, Compare, Vector> &other) const {
   return _vector <= other._vector;
 }
 
@@ -298,9 +298,9 @@ operator <= (const ordered_vector<Key, Compare> &other) const {
 //               lexicographically after the other one or is
 //               equivalent, false otherwise.
 ////////////////////////////////////////////////////////////////////
-template<class Key, class Compare>
-INLINE bool ordered_vector<Key, Compare>::
-operator >= (const ordered_vector<Key, Compare> &other) const {
+template<class Key, class Compare, class Vector>
+INLINE bool ordered_vector<Key, Compare, Vector>::
+operator >= (const ordered_vector<Key, Compare, Vector> &other) const {
   return _vector >= other._vector;
 }
 
@@ -318,9 +318,9 @@ operator >= (const ordered_vector<Key, Compare> &other) const {
 //               original element), and the second componet is true if
 //               the insert operation has taken place.
 ////////////////////////////////////////////////////////////////////
-template<class Key, class Compare>
-INLINE pair<TYPENAME ordered_vector<Key, Compare>::ITERATOR, bool> ordered_vector<Key, Compare>::
-insert_unique(const TYPENAME ordered_vector<Key, Compare>::VALUE_TYPE &key) {
+template<class Key, class Compare, class Vector>
+INLINE pair<TYPENAME ordered_vector<Key, Compare, Vector>::ITERATOR, bool> ordered_vector<Key, Compare, Vector>::
+insert_unique(const TYPENAME ordered_vector<Key, Compare, Vector>::VALUE_TYPE &key) {
   TAU_PROFILE("ordered_vector::insert_unique(const value_type &)", " ", TAU_USER);
   ITERATOR position = find_insert_position(begin(), end(), key);
 #ifdef NDEBUG
@@ -351,9 +351,9 @@ insert_unique(const TYPENAME ordered_vector<Key, Compare>::VALUE_TYPE &key) {
 //               The return value is the iterator referencing the new
 //               element.
 ////////////////////////////////////////////////////////////////////
-template<class Key, class Compare>
-INLINE TYPENAME ordered_vector<Key, Compare>::ITERATOR ordered_vector<Key, Compare>::
-insert_nonunique(const TYPENAME ordered_vector<Key, Compare>::VALUE_TYPE &key) {
+template<class Key, class Compare, class Vector>
+INLINE TYPENAME ordered_vector<Key, Compare, Vector>::ITERATOR ordered_vector<Key, Compare, Vector>::
+insert_nonunique(const TYPENAME ordered_vector<Key, Compare, Vector>::VALUE_TYPE &key) {
   TAU_PROFILE("ordered_vector::insert_nonunique(const value_type &)", " ", TAU_USER);
   ITERATOR position = find_insert_position(begin(), end(), key);
   nassertr(position >= begin() && position <= end(), end());
@@ -371,10 +371,10 @@ insert_nonunique(const TYPENAME ordered_vector<Key, Compare>::VALUE_TYPE &key) {
 //               already verified that this is the correct sorting
 //               position; no checks are made.
 ////////////////////////////////////////////////////////////////////
-template<class Key, class Compare>
-INLINE TYPENAME ordered_vector<Key, Compare>::ITERATOR ordered_vector<Key, Compare>::
-insert_unverified(TYPENAME ordered_vector<Key, Compare>::ITERATOR position, 
-                  const TYPENAME ordered_vector<Key, Compare>::VALUE_TYPE &key) {
+template<class Key, class Compare, class Vector>
+INLINE TYPENAME ordered_vector<Key, Compare, Vector>::ITERATOR ordered_vector<Key, Compare, Vector>::
+insert_unverified(TYPENAME ordered_vector<Key, Compare, Vector>::ITERATOR position, 
+                  const TYPENAME ordered_vector<Key, Compare, Vector>::VALUE_TYPE &key) {
   TAU_PROFILE("ordered_vector::insert_unverified(iterator, const value_type &)", " ", TAU_USER);
   ITERATOR result = _vector.insert(position, key);
   return result;
@@ -386,9 +386,9 @@ insert_unverified(TYPENAME ordered_vector<Key, Compare>::ITERATOR position,
 //  Description: Removes the element indicated by the given iterator,
 //               and returns the next sequential iterator.
 ////////////////////////////////////////////////////////////////////
-template<class Key, class Compare>
-INLINE TYPENAME ordered_vector<Key, Compare>::ITERATOR ordered_vector<Key, Compare>::
-erase(TYPENAME ordered_vector<Key, Compare>::ITERATOR position) {
+template<class Key, class Compare, class Vector>
+INLINE TYPENAME ordered_vector<Key, Compare, Vector>::ITERATOR ordered_vector<Key, Compare, Vector>::
+erase(TYPENAME ordered_vector<Key, Compare, Vector>::ITERATOR position) {
   TAU_PROFILE("ordered_vector::erase(iterator)", " ", TAU_USER);
   SIZE_TYPE count = position - begin();
   _vector.erase(position);
@@ -401,9 +401,9 @@ erase(TYPENAME ordered_vector<Key, Compare>::ITERATOR position) {
 //  Description: Removes all elements matching the indicated key;
 //               returns the number of elements removed.
 ////////////////////////////////////////////////////////////////////
-template<class Key, class Compare>
-INLINE TYPENAME ordered_vector<Key, Compare>::SIZE_TYPE ordered_vector<Key, Compare>::
-erase(const TYPENAME ordered_vector<Key, Compare>::KEY_TYPE &key) {
+template<class Key, class Compare, class Vector>
+INLINE TYPENAME ordered_vector<Key, Compare, Vector>::SIZE_TYPE ordered_vector<Key, Compare, Vector>::
+erase(const TYPENAME ordered_vector<Key, Compare, Vector>::KEY_TYPE &key) {
   TAU_PROFILE("ordered_vector::erase(const key_type &)", " ", TAU_USER);
   pair<ITERATOR, ITERATOR> result = equal_range(key);
   SIZE_TYPE count = result.second - result.first;
@@ -417,10 +417,10 @@ erase(const TYPENAME ordered_vector<Key, Compare>::KEY_TYPE &key) {
 //  Description: Removes all elements indicated by the given iterator
 //               range.
 ////////////////////////////////////////////////////////////////////
-template<class Key, class Compare>
-INLINE void ordered_vector<Key, Compare>::
-erase(TYPENAME ordered_vector<Key, Compare>::ITERATOR first,
-      TYPENAME ordered_vector<Key, Compare>::ITERATOR last) {
+template<class Key, class Compare, class Vector>
+INLINE void ordered_vector<Key, Compare, Vector>::
+erase(TYPENAME ordered_vector<Key, Compare, Vector>::ITERATOR first,
+      TYPENAME ordered_vector<Key, Compare, Vector>::ITERATOR last) {
   TAU_PROFILE("ordered_vector::erase(iterator, iterator)", " ", TAU_USER);
   _vector.erase(first, last);
 }
@@ -430,8 +430,8 @@ erase(TYPENAME ordered_vector<Key, Compare>::ITERATOR first,
 //       Access: Public
 //  Description: Removes all elements from the ordered vector.
 ////////////////////////////////////////////////////////////////////
-template<class Key, class Compare>
-INLINE void ordered_vector<Key, Compare>::
+template<class Key, class Compare, class Vector>
+INLINE void ordered_vector<Key, Compare, Vector>::
 clear() {
   TAU_PROFILE("ordered_vector::clear()", " ", TAU_USER);
   _vector.erase(_vector.begin(), _vector.end());
@@ -445,9 +445,9 @@ clear() {
 //               is not.  If there are multiple elements matching the
 //               key, the particular iterator returned is not defined.
 ////////////////////////////////////////////////////////////////////
-template<class Key, class Compare>
-INLINE TYPENAME ordered_vector<Key, Compare>::ITERATOR ordered_vector<Key, Compare>::
-find(const TYPENAME ordered_vector<Key, Compare>::KEY_TYPE &key) {
+template<class Key, class Compare, class Vector>
+INLINE TYPENAME ordered_vector<Key, Compare, Vector>::ITERATOR ordered_vector<Key, Compare, Vector>::
+find(const TYPENAME ordered_vector<Key, Compare, Vector>::KEY_TYPE &key) {
   TAU_PROFILE("ordered_vector::find(const key_type &)", " ", TAU_USER);
   return nci(r_find(begin(), end(), end(), key));
 }
@@ -460,9 +460,9 @@ find(const TYPENAME ordered_vector<Key, Compare>::KEY_TYPE &key) {
 //               is not.  If there are multiple elements matching the
 //               key, the particular iterator returned is not defined.
 ////////////////////////////////////////////////////////////////////
-template<class Key, class Compare>
-INLINE TYPENAME ordered_vector<Key, Compare>::CONST_ITERATOR ordered_vector<Key, Compare>::
-find(const TYPENAME ordered_vector<Key, Compare>::KEY_TYPE &key) const {
+template<class Key, class Compare, class Vector>
+INLINE TYPENAME ordered_vector<Key, Compare, Vector>::CONST_ITERATOR ordered_vector<Key, Compare, Vector>::
+find(const TYPENAME ordered_vector<Key, Compare, Vector>::KEY_TYPE &key) const {
   TAU_PROFILE("ordered_vector::find(const key_type &)", " ", TAU_USER);
   return r_find(begin(), end(), end(), key);
 }
@@ -483,9 +483,9 @@ find(const TYPENAME ordered_vector<Key, Compare>::KEY_TYPE &key) const {
 //               The assumption is that == implies !Compare(a, b) and
 //               !Compare(b, a), but not necessarily the converse.
 ////////////////////////////////////////////////////////////////////
-template<class Key, class Compare>
-INLINE TYPENAME ordered_vector<Key, Compare>::ITERATOR ordered_vector<Key, Compare>::
-find_particular(const TYPENAME ordered_vector<Key, Compare>::KEY_TYPE &key) {
+template<class Key, class Compare, class Vector>
+INLINE TYPENAME ordered_vector<Key, Compare, Vector>::ITERATOR ordered_vector<Key, Compare, Vector>::
+find_particular(const TYPENAME ordered_vector<Key, Compare, Vector>::KEY_TYPE &key) {
   TAU_PROFILE("ordered_vector::find_particular(const key_type &)", " ", TAU_USER);
   return nci(r_find_particular(begin(), end(), end(), key));
 }
@@ -503,9 +503,9 @@ find_particular(const TYPENAME ordered_vector<Key, Compare>::KEY_TYPE &key) {
 //               multiple matches exist within the vector, the
 //               particular iterator returned is not defined./
 ////////////////////////////////////////////////////////////////////
-template<class Key, class Compare>
-INLINE TYPENAME ordered_vector<Key, Compare>::CONST_ITERATOR ordered_vector<Key, Compare>::
-find_particular(const TYPENAME ordered_vector<Key, Compare>::KEY_TYPE &key) const {
+template<class Key, class Compare, class Vector>
+INLINE TYPENAME ordered_vector<Key, Compare, Vector>::CONST_ITERATOR ordered_vector<Key, Compare, Vector>::
+find_particular(const TYPENAME ordered_vector<Key, Compare, Vector>::KEY_TYPE &key) const {
   TAU_PROFILE("ordered_vector::find_particular(const key_type &)", " ", TAU_USER);
   return r_find_particular(begin(), end(), end(), key);
 }
@@ -516,8 +516,8 @@ find_particular(const TYPENAME ordered_vector<Key, Compare>::KEY_TYPE &key) cons
 //  Description: Returns the number of elements that sort equivalent
 //               to the key that are in the vector.
 ////////////////////////////////////////////////////////////////////
-template<class Key, class Compare>
-INLINE TYPENAME ordered_vector<Key, Compare>::SIZE_TYPE ordered_vector<Key, Compare>::
+template<class Key, class Compare, class Vector>
+INLINE TYPENAME ordered_vector<Key, Compare, Vector>::SIZE_TYPE ordered_vector<Key, Compare, Vector>::
 count(const key_type &key) const {
   TAU_PROFILE("ordered_vector::count(const key_type &)", " ", TAU_USER);
   return r_count(begin(), end(), key);
@@ -529,9 +529,9 @@ count(const key_type &key) const {
 //  Description: Returns the iterator for the first element not less
 //               than key, or end() if all elements are less than key.
 ////////////////////////////////////////////////////////////////////
-template<class Key, class Compare>
-INLINE TYPENAME ordered_vector<Key, Compare>::ITERATOR ordered_vector<Key, Compare>::
-lower_bound(const TYPENAME ordered_vector<Key, Compare>::KEY_TYPE &key) {
+template<class Key, class Compare, class Vector>
+INLINE TYPENAME ordered_vector<Key, Compare, Vector>::ITERATOR ordered_vector<Key, Compare, Vector>::
+lower_bound(const TYPENAME ordered_vector<Key, Compare, Vector>::KEY_TYPE &key) {
   TAU_PROFILE("ordered_vector::lower_bound(const key_type &)", " ", TAU_USER);
   return nci(r_lower_bound(begin(), end(), key));
 }
@@ -542,9 +542,9 @@ lower_bound(const TYPENAME ordered_vector<Key, Compare>::KEY_TYPE &key) {
 //  Description: Returns the iterator for the first element not less
 //               than key, or end() if all elements are less than key.
 ////////////////////////////////////////////////////////////////////
-template<class Key, class Compare>
-INLINE TYPENAME ordered_vector<Key, Compare>::CONST_ITERATOR ordered_vector<Key, Compare>::
-lower_bound(const TYPENAME ordered_vector<Key, Compare>::KEY_TYPE &key) const {
+template<class Key, class Compare, class Vector>
+INLINE TYPENAME ordered_vector<Key, Compare, Vector>::CONST_ITERATOR ordered_vector<Key, Compare, Vector>::
+lower_bound(const TYPENAME ordered_vector<Key, Compare, Vector>::KEY_TYPE &key) const {
   TAU_PROFILE("ordered_vector::lower_bound(const key_type &)", " ", TAU_USER);
   return r_lower_bound(begin(), end(), key);
 }
@@ -556,9 +556,9 @@ lower_bound(const TYPENAME ordered_vector<Key, Compare>::KEY_TYPE &key) const {
 //               than key, or end() if no element is greater than
 //               key.
 ////////////////////////////////////////////////////////////////////
-template<class Key, class Compare>
-INLINE TYPENAME ordered_vector<Key, Compare>::ITERATOR ordered_vector<Key, Compare>::
-upper_bound(const TYPENAME ordered_vector<Key, Compare>::KEY_TYPE &key) {
+template<class Key, class Compare, class Vector>
+INLINE TYPENAME ordered_vector<Key, Compare, Vector>::ITERATOR ordered_vector<Key, Compare, Vector>::
+upper_bound(const TYPENAME ordered_vector<Key, Compare, Vector>::KEY_TYPE &key) {
   TAU_PROFILE("ordered_vector::upper_bound(const key_type &)", " ", TAU_USER);
   return nci(r_upper_bound(begin(), end(), key));
 }
@@ -570,9 +570,9 @@ upper_bound(const TYPENAME ordered_vector<Key, Compare>::KEY_TYPE &key) {
 //               than key, or end() if no element is greater than
 //               key.
 ////////////////////////////////////////////////////////////////////
-template<class Key, class Compare>
-INLINE TYPENAME ordered_vector<Key, Compare>::CONST_ITERATOR ordered_vector<Key, Compare>::
-upper_bound(const TYPENAME ordered_vector<Key, Compare>::KEY_TYPE &key) const {
+template<class Key, class Compare, class Vector>
+INLINE TYPENAME ordered_vector<Key, Compare, Vector>::CONST_ITERATOR ordered_vector<Key, Compare, Vector>::
+upper_bound(const TYPENAME ordered_vector<Key, Compare, Vector>::KEY_TYPE &key) const {
   TAU_PROFILE("ordered_vector::upper_bound(const key_type &)", " ", TAU_USER);
   return r_upper_bound(begin(), end(), key);
 }
@@ -582,13 +582,13 @@ upper_bound(const TYPENAME ordered_vector<Key, Compare>::KEY_TYPE &key) const {
 //       Access: Public
 //  Description: Returns the pair (lower_bound(key), upper_bound(key)).
 ////////////////////////////////////////////////////////////////////
-template<class Key, class Compare>
-INLINE pair<TYPENAME ordered_vector<Key, Compare>::ITERATOR, TYPENAME ordered_vector<Key, Compare>::ITERATOR> ordered_vector<Key, Compare>::
-equal_range(const TYPENAME ordered_vector<Key, Compare>::KEY_TYPE &key) {
+template<class Key, class Compare, class Vector>
+INLINE pair<TYPENAME ordered_vector<Key, Compare, Vector>::ITERATOR, TYPENAME ordered_vector<Key, Compare, Vector>::ITERATOR> ordered_vector<Key, Compare, Vector>::
+equal_range(const TYPENAME ordered_vector<Key, Compare, Vector>::KEY_TYPE &key) {
   TAU_PROFILE("ordered_vector::equal_range(const key_type &)", " ", TAU_USER);
-  pair<TYPENAME ordered_vector<Key, Compare>::CONST_ITERATOR, TYPENAME ordered_vector<Key, Compare>::CONST_ITERATOR> result;
+  pair<TYPENAME ordered_vector<Key, Compare, Vector>::CONST_ITERATOR, TYPENAME ordered_vector<Key, Compare, Vector>::CONST_ITERATOR> result;
   result = r_equal_range(begin(), end(), key);
-  return pair<TYPENAME ordered_vector<Key, Compare>::ITERATOR, TYPENAME ordered_vector<Key, Compare>::ITERATOR>(nci(result.first), nci(result.second));
+  return pair<TYPENAME ordered_vector<Key, Compare, Vector>::ITERATOR, TYPENAME ordered_vector<Key, Compare, Vector>::ITERATOR>(nci(result.first), nci(result.second));
 }
 
 ////////////////////////////////////////////////////////////////////
@@ -596,9 +596,9 @@ equal_range(const TYPENAME ordered_vector<Key, Compare>::KEY_TYPE &key) {
 //       Access: Public
 //  Description: Returns the pair (lower_bound(key), upper_bound(key)).
 ////////////////////////////////////////////////////////////////////
-template<class Key, class Compare>
-INLINE pair<TYPENAME ordered_vector<Key, Compare>::CONST_ITERATOR, TYPENAME ordered_vector<Key, Compare>::CONST_ITERATOR> ordered_vector<Key, Compare>::
-equal_range(const TYPENAME ordered_vector<Key, Compare>::KEY_TYPE &key) const {
+template<class Key, class Compare, class Vector>
+INLINE pair<TYPENAME ordered_vector<Key, Compare, Vector>::CONST_ITERATOR, TYPENAME ordered_vector<Key, Compare, Vector>::CONST_ITERATOR> ordered_vector<Key, Compare, Vector>::
+equal_range(const TYPENAME ordered_vector<Key, Compare, Vector>::KEY_TYPE &key) const {
   TAU_PROFILE("ordered_vector::equal_range(const key_type &)", " ", TAU_USER);
   return r_equal_range(begin(), end(), key);
 }
@@ -609,9 +609,9 @@ equal_range(const TYPENAME ordered_vector<Key, Compare>::KEY_TYPE &key) const {
 //  Description: Exchanges the contents of this vector and the other
 //               vector, in constant time (e.g., with a pointer swap).
 ////////////////////////////////////////////////////////////////////
-template<class Key, class Compare>
-INLINE void ordered_vector<Key, Compare>::
-swap(ordered_vector<Key, Compare> &copy) {
+template<class Key, class Compare, class Vector>
+INLINE void ordered_vector<Key, Compare, Vector>::
+swap(ordered_vector<Key, Compare, Vector> &copy) {
   TAU_PROFILE("ordered_vector::swap(ordered_vector &)", " ", TAU_USER);
   _vector.swap(copy._vector);
 }
@@ -623,9 +623,9 @@ swap(ordered_vector<Key, Compare> &copy) {
 //               ensures that the capacity of the vector is greater
 //               than or equal to n.
 ////////////////////////////////////////////////////////////////////
-template<class Key, class Compare>
-INLINE void ordered_vector<Key, Compare>::
-reserve(TYPENAME ordered_vector<Key, Compare>::SIZE_TYPE n) {
+template<class Key, class Compare, class Vector>
+INLINE void ordered_vector<Key, Compare, Vector>::
+reserve(TYPENAME ordered_vector<Key, Compare, Vector>::SIZE_TYPE n) {
   TAU_PROFILE("ordered_vector::reserve(size_type)", " ", TAU_USER);
   _vector.reserve(n);
 }
@@ -642,8 +642,8 @@ reserve(TYPENAME ordered_vector<Key, Compare>::SIZE_TYPE n) {
 //               This flavor of sort also eliminates repeated
 //               elements.
 ////////////////////////////////////////////////////////////////////
-template<class Key, class Compare>
-INLINE void ordered_vector<Key, Compare>::
+template<class Key, class Compare, class Vector>
+INLINE void ordered_vector<Key, Compare, Vector>::
 sort_unique() {
   TAU_PROFILE("ordered_vector::sort_unique()", " ", TAU_USER);
   sort(begin(), end(), _compare);
@@ -660,8 +660,8 @@ sort_unique() {
 //               written to the vector using the non-const iterators
 //               or has called push_back().
 ////////////////////////////////////////////////////////////////////
-template<class Key, class Compare>
-INLINE void ordered_vector<Key, Compare>::
+template<class Key, class Compare, class Vector>
+INLINE void ordered_vector<Key, Compare, Vector>::
 sort_nonunique() {
   TAU_PROFILE("ordered_vector::sort_nonunique()", " ", TAU_USER);
   stable_sort(begin(), end(), _compare);
@@ -675,8 +675,8 @@ sort_nonunique() {
 //               except to populate the vector the first time; be sure
 //               to call sort() after you have added all the elements.
 ////////////////////////////////////////////////////////////////////
-template<class Key, class Compare>
-INLINE void ordered_vector<Key, Compare>::
+template<class Key, class Compare, class Vector>
+INLINE void ordered_vector<Key, Compare, Vector>::
 push_back(const value_type &key) {
   TAU_PROFILE("ordered_vector::push_back()", " ", TAU_USER);
   _vector.push_back(key);
@@ -687,8 +687,8 @@ push_back(const value_type &key) {
 //       Access: Public
 //  Description: Removes the last element at the end of the vector.
 ////////////////////////////////////////////////////////////////////
-template<class Key, class Compare>
-INLINE void ordered_vector<Key, Compare>::
+template<class Key, class Compare, class Vector>
+INLINE void ordered_vector<Key, Compare, Vector>::
 pop_back() {
   TAU_PROFILE("ordered_vector::pop_back()", " ", TAU_USER);
   _vector.pop_back();
@@ -702,9 +702,9 @@ pop_back() {
 //               easy definition of const vs. non-const flavors of
 //               some of these methods.
 ////////////////////////////////////////////////////////////////////
-template<class Key, class Compare>
-INLINE TYPENAME ordered_vector<Key, Compare>::ITERATOR ordered_vector<Key, Compare>::
-nci(TYPENAME ordered_vector<Key, Compare>::CONST_ITERATOR i) {
+template<class Key, class Compare, class Vector>
+INLINE TYPENAME ordered_vector<Key, Compare, Vector>::ITERATOR ordered_vector<Key, Compare, Vector>::
+nci(TYPENAME ordered_vector<Key, Compare, Vector>::CONST_ITERATOR i) {
   return begin() + (i - begin());
 }
 
@@ -715,11 +715,11 @@ nci(TYPENAME ordered_vector<Key, Compare>::CONST_ITERATOR i) {
 //               vector to insert the indicated key, and returns the
 //               corresponding iterator.
 ////////////////////////////////////////////////////////////////////
-template<class Key, class Compare>
-INLINE TYPENAME ordered_vector<Key, Compare>::ITERATOR ordered_vector<Key, Compare>::
-find_insert_position(TYPENAME ordered_vector<Key, Compare>::ITERATOR first,
-                     TYPENAME ordered_vector<Key, Compare>::ITERATOR last,
-                     const TYPENAME ordered_vector<Key, Compare>::KEY_TYPE &key) {
+template<class Key, class Compare, class Vector>
+INLINE TYPENAME ordered_vector<Key, Compare, Vector>::ITERATOR ordered_vector<Key, Compare, Vector>::
+find_insert_position(TYPENAME ordered_vector<Key, Compare, Vector>::ITERATOR first,
+                     TYPENAME ordered_vector<Key, Compare, Vector>::ITERATOR last,
+                     const TYPENAME ordered_vector<Key, Compare, Vector>::KEY_TYPE &key) {
   ITERATOR result = r_find_insert_position(first, last, key);
   return result;
 }
@@ -729,10 +729,10 @@ find_insert_position(TYPENAME ordered_vector<Key, Compare>::ITERATOR first,
 //       Access: Public
 //  Description: 
 ////////////////////////////////////////////////////////////////////
-template<class Key, class Compare>
-INLINE ov_set<Key, Compare>::
+template<class Key, class Compare, class Vector>
+INLINE ov_set<Key, Compare, Vector>::
 ov_set(TypeHandle type_handle) :
-  ordered_vector<Key, Compare>(type_handle)
+  ordered_vector<Key, Compare, Vector>(type_handle)
 {
 }
 
@@ -741,10 +741,10 @@ ov_set(TypeHandle type_handle) :
 //       Access: Public
 //  Description: 
 ////////////////////////////////////////////////////////////////////
-template<class Key, class Compare>
-INLINE ov_set<Key, Compare>::
+template<class Key, class Compare, class Vector>
+INLINE ov_set<Key, Compare, Vector>::
 ov_set(const Compare &compare, TypeHandle type_handle) :
-  ordered_vector<Key, Compare>(compare, type_handle)
+  ordered_vector<Key, Compare, Vector>(compare, type_handle)
 {
 }
 
@@ -753,10 +753,10 @@ ov_set(const Compare &compare, TypeHandle type_handle) :
 //       Access: Public
 //  Description: 
 ////////////////////////////////////////////////////////////////////
-template<class Key, class Compare>
-INLINE ov_set<Key, Compare>::
-ov_set(const ov_set<Key, Compare> &copy) :
-  ordered_vector<Key, Compare>(copy)
+template<class Key, class Compare, class Vector>
+INLINE ov_set<Key, Compare, Vector>::
+ov_set(const ov_set<Key, Compare, Vector> &copy) :
+  ordered_vector<Key, Compare, Vector>(copy)
 {
 }
 
@@ -765,10 +765,10 @@ ov_set(const ov_set<Key, Compare> &copy) :
 //       Access: Public
 //  Description: 
 ////////////////////////////////////////////////////////////////////
-template<class Key, class Compare>
-INLINE ov_set<Key, Compare> &ov_set<Key, Compare>::
-operator = (const ov_set<Key, Compare> &copy) {
-  ordered_vector<Key, Compare>::operator = (copy);
+template<class Key, class Compare, class Vector>
+INLINE ov_set<Key, Compare, Vector> &ov_set<Key, Compare, Vector>::
+operator = (const ov_set<Key, Compare, Vector> &copy) {
+  ordered_vector<Key, Compare, Vector>::operator = (copy);
   return *this;
 }
 
@@ -777,11 +777,11 @@ operator = (const ov_set<Key, Compare> &copy) {
 //       Access: Public
 //  Description: Maps to insert_unique().
 ////////////////////////////////////////////////////////////////////
-template<class Key, class Compare>
-TYPENAME ov_set<Key, Compare>::ITERATOR ov_set<Key, Compare>::
-insert(TYPENAME ov_set<Key, Compare>::ITERATOR position, 
-       const TYPENAME ov_set<Key, Compare>::VALUE_TYPE &key) {
-  return ordered_vector<Key, Compare>::insert_unique(position, key);
+template<class Key, class Compare, class Vector>
+TYPENAME ov_set<Key, Compare, Vector>::ITERATOR ov_set<Key, Compare, Vector>::
+insert(TYPENAME ov_set<Key, Compare, Vector>::ITERATOR position, 
+       const TYPENAME ov_set<Key, Compare, Vector>::VALUE_TYPE &key) {
+  return ordered_vector<Key, Compare, Vector>::insert_unique(position, key);
 }
 
 ////////////////////////////////////////////////////////////////////
@@ -789,10 +789,10 @@ insert(TYPENAME ov_set<Key, Compare>::ITERATOR position,
 //       Access: Public
 //  Description: Maps to insert_unique().
 ////////////////////////////////////////////////////////////////////
-template<class Key, class Compare>
-INLINE pair<TYPENAME ov_set<Key, Compare>::ITERATOR, bool> ov_set<Key, Compare>::
-insert(const TYPENAME ov_set<Key, Compare>::VALUE_TYPE &key) {
-  return ordered_vector<Key, Compare>::insert_unique(key);
+template<class Key, class Compare, class Vector>
+INLINE pair<TYPENAME ov_set<Key, Compare, Vector>::ITERATOR, bool> ov_set<Key, Compare, Vector>::
+insert(const TYPENAME ov_set<Key, Compare, Vector>::VALUE_TYPE &key) {
+  return ordered_vector<Key, Compare, Vector>::insert_unique(key);
 }
 
 ////////////////////////////////////////////////////////////////////
@@ -800,10 +800,10 @@ insert(const TYPENAME ov_set<Key, Compare>::VALUE_TYPE &key) {
 //       Access: Public
 //  Description: Maps to sort_unique().
 ////////////////////////////////////////////////////////////////////
-template<class Key, class Compare>
-INLINE void ov_set<Key, Compare>::
+template<class Key, class Compare, class Vector>
+INLINE void ov_set<Key, Compare, Vector>::
 sort() {
-  ordered_vector<Key, Compare>::sort_unique();
+  ordered_vector<Key, Compare, Vector>::sort_unique();
 }
 
 ////////////////////////////////////////////////////////////////////
@@ -811,10 +811,10 @@ sort() {
 //       Access: Public
 //  Description: Maps to verify_list_unique().
 ////////////////////////////////////////////////////////////////////
-template<class Key, class Compare>
-INLINE bool ov_set<Key, Compare>::
+template<class Key, class Compare, class Vector>
+INLINE bool ov_set<Key, Compare, Vector>::
 verify_list() const {
-  return ordered_vector<Key, Compare>::verify_list_unique();
+  return ordered_vector<Key, Compare, Vector>::verify_list_unique();
 }
 
 ////////////////////////////////////////////////////////////////////
@@ -822,10 +822,10 @@ verify_list() const {
 //       Access: Public
 //  Description: 
 ////////////////////////////////////////////////////////////////////
-template<class Key, class Compare>
-INLINE ov_multiset<Key, Compare>::
+template<class Key, class Compare, class Vector>
+INLINE ov_multiset<Key, Compare, Vector>::
 ov_multiset(TypeHandle type_handle) :
-  ordered_vector<Key, Compare>(type_handle)
+  ordered_vector<Key, Compare, Vector>(type_handle)
 {
 }
 
@@ -834,10 +834,10 @@ ov_multiset(TypeHandle type_handle) :
 //       Access: Public
 //  Description: 
 ////////////////////////////////////////////////////////////////////
-template<class Key, class Compare>
-INLINE ov_multiset<Key, Compare>::
+template<class Key, class Compare, class Vector>
+INLINE ov_multiset<Key, Compare, Vector>::
 ov_multiset(const Compare &compare, TypeHandle type_handle) :
-  ordered_vector<Key, Compare>(compare, type_handle)
+  ordered_vector<Key, Compare, Vector>(compare, type_handle)
 {
 }
 
@@ -846,10 +846,10 @@ ov_multiset(const Compare &compare, TypeHandle type_handle) :
 //       Access: Public
 //  Description: 
 ////////////////////////////////////////////////////////////////////
-template<class Key, class Compare>
-INLINE ov_multiset<Key, Compare>::
-ov_multiset(const ov_multiset<Key, Compare> &copy) :
-  ordered_vector<Key, Compare>(copy)
+template<class Key, class Compare, class Vector>
+INLINE ov_multiset<Key, Compare, Vector>::
+ov_multiset(const ov_multiset<Key, Compare, Vector> &copy) :
+  ordered_vector<Key, Compare, Vector>(copy)
 {
 }
 
@@ -858,10 +858,10 @@ ov_multiset(const ov_multiset<Key, Compare> &copy) :
 //       Access: Public
 //  Description: 
 ////////////////////////////////////////////////////////////////////
-template<class Key, class Compare>
-INLINE ov_multiset<Key, Compare> &ov_multiset<Key, Compare>::
-operator = (const ov_multiset<Key, Compare> &copy) {
-  ordered_vector<Key, Compare>::operator = (copy);
+template<class Key, class Compare, class Vector>
+INLINE ov_multiset<Key, Compare, Vector> &ov_multiset<Key, Compare, Vector>::
+operator = (const ov_multiset<Key, Compare, Vector> &copy) {
+  ordered_vector<Key, Compare, Vector>::operator = (copy);
   return *this;
 }
 
@@ -870,11 +870,11 @@ operator = (const ov_multiset<Key, Compare> &copy) {
 //       Access: Public
 //  Description: Maps to insert_nonunique().
 ////////////////////////////////////////////////////////////////////
-template<class Key, class Compare>
-TYPENAME ov_multiset<Key, Compare>::ITERATOR ov_multiset<Key, Compare>::
-insert(TYPENAME ov_multiset<Key, Compare>::ITERATOR position, 
-       const TYPENAME ov_multiset<Key, Compare>::VALUE_TYPE &key) {
-  return ordered_vector<Key, Compare>::insert_nonunique(position, key);
+template<class Key, class Compare, class Vector>
+TYPENAME ov_multiset<Key, Compare, Vector>::ITERATOR ov_multiset<Key, Compare, Vector>::
+insert(TYPENAME ov_multiset<Key, Compare, Vector>::ITERATOR position, 
+       const TYPENAME ov_multiset<Key, Compare, Vector>::VALUE_TYPE &key) {
+  return ordered_vector<Key, Compare, Vector>::insert_nonunique(position, key);
 }
 
 ////////////////////////////////////////////////////////////////////
@@ -882,10 +882,10 @@ insert(TYPENAME ov_multiset<Key, Compare>::ITERATOR position,
 //       Access: Public
 //  Description: Maps to insert_nonunique().
 ////////////////////////////////////////////////////////////////////
-template<class Key, class Compare>
-INLINE TYPENAME ov_multiset<Key, Compare>::ITERATOR ov_multiset<Key, Compare>::
-insert(const TYPENAME ov_multiset<Key, Compare>::VALUE_TYPE &key) {
-  return ordered_vector<Key, Compare>::insert_nonunique(key);
+template<class Key, class Compare, class Vector>
+INLINE TYPENAME ov_multiset<Key, Compare, Vector>::ITERATOR ov_multiset<Key, Compare, Vector>::
+insert(const TYPENAME ov_multiset<Key, Compare, Vector>::VALUE_TYPE &key) {
+  return ordered_vector<Key, Compare, Vector>::insert_nonunique(key);
 }
 
 ////////////////////////////////////////////////////////////////////
@@ -893,10 +893,10 @@ insert(const TYPENAME ov_multiset<Key, Compare>::VALUE_TYPE &key) {
 //       Access: Public
 //  Description: Maps to sort_nonunique().
 ////////////////////////////////////////////////////////////////////
-template<class Key, class Compare>
-INLINE void ov_multiset<Key, Compare>::
+template<class Key, class Compare, class Vector>
+INLINE void ov_multiset<Key, Compare, Vector>::
 sort() {
-  ordered_vector<Key, Compare>::sort_nonunique();
+  ordered_vector<Key, Compare, Vector>::sort_nonunique();
 }
 
 ////////////////////////////////////////////////////////////////////
@@ -904,8 +904,8 @@ sort() {
 //       Access: Public
 //  Description: Maps to verify_list_nonunique().
 ////////////////////////////////////////////////////////////////////
-template<class Key, class Compare>
-INLINE bool ov_multiset<Key, Compare>::
+template<class Key, class Compare, class Vector>
+INLINE bool ov_multiset<Key, Compare, Vector>::
 verify_list() const {
-  return ordered_vector<Key, Compare>::verify_list_nonunique();
+  return ordered_vector<Key, Compare, Vector>::verify_list_nonunique();
 }

+ 51 - 51
panda/src/express/ordered_vector.T

@@ -27,10 +27,10 @@
 //               already present, it is not inserted, and the iterator
 //               referencing the original value is returned.
 ////////////////////////////////////////////////////////////////////
-template<class Key, class Compare>
-TYPENAME ordered_vector<Key, Compare>::ITERATOR ordered_vector<Key, Compare>::
-insert_unique(TYPENAME ordered_vector<Key, Compare>::ITERATOR position, 
-              const TYPENAME ordered_vector<Key, Compare>::VALUE_TYPE &key) {
+template<class Key, class Compare, class Vector>
+TYPENAME ordered_vector<Key, Compare, Vector>::ITERATOR ordered_vector<Key, Compare, Vector>::
+insert_unique(TYPENAME ordered_vector<Key, Compare, Vector>::ITERATOR position, 
+              const TYPENAME ordered_vector<Key, Compare, Vector>::VALUE_TYPE &key) {
   TAU_PROFILE("ordered_vector::insert_unique(iterator, const value_type &)", " ", TAU_USER);
   if (position != end()) {
     // If we're not inserting at the end, the element we're
@@ -74,10 +74,10 @@ insert_unique(TYPENAME ordered_vector<Key, Compare>::ITERATOR position,
 //               This flavor of insert allows multiple copies of the
 //               same key to be inserted.
 ////////////////////////////////////////////////////////////////////
-template<class Key, class Compare>
-TYPENAME ordered_vector<Key, Compare>::ITERATOR ordered_vector<Key, Compare>::
-insert_nonunique(TYPENAME ordered_vector<Key, Compare>::ITERATOR position, 
-                 const TYPENAME ordered_vector<Key, Compare>::VALUE_TYPE &key) {
+template<class Key, class Compare, class Vector>
+TYPENAME ordered_vector<Key, Compare, Vector>::ITERATOR ordered_vector<Key, Compare, Vector>::
+insert_nonunique(TYPENAME ordered_vector<Key, Compare, Vector>::ITERATOR position, 
+                 const TYPENAME ordered_vector<Key, Compare, Vector>::VALUE_TYPE &key) {
   TAU_PROFILE("ordered_vector::insert_nonunique(iterator, const value_type &)", " ", TAU_USER);
   if (position != end()) {
     // If we're not inserting at the end, the element we're
@@ -107,8 +107,8 @@ insert_nonunique(TYPENAME ordered_vector<Key, Compare>::ITERATOR position,
 //               sorted correctly.  Returns true if this is the case;
 //               otherwise, returns false.
 ////////////////////////////////////////////////////////////////////
-template<class Key, class Compare>
-bool ordered_vector<Key, Compare>::
+template<class Key, class Compare, class Vector>
+bool ordered_vector<Key, Compare, Vector>::
 verify_list_unique() const {
   TAU_PROFILE("ordered_vector::verify_list_unique()", " ", TAU_USER);
   if (!empty()) {
@@ -134,8 +134,8 @@ verify_list_unique() const {
 //               sorted correctly.  Returns true if this is the case;
 //               otherwise, returns false.
 ////////////////////////////////////////////////////////////////////
-template<class Key, class Compare>
-bool ordered_vector<Key, Compare>::
+template<class Key, class Compare, class Vector>
+bool ordered_vector<Key, Compare, Vector>::
 verify_list_nonunique() const {
   TAU_PROFILE("ordered_vector::verify_list_nonunique()", " ", TAU_USER);
   if (!empty()) {
@@ -161,11 +161,11 @@ verify_list_nonunique() const {
 //  Description: The recursive implementation of
 //               find_insert_position().
 ////////////////////////////////////////////////////////////////////
-template<class Key, class Compare>
-TYPENAME ordered_vector<Key, Compare>::ITERATOR ordered_vector<Key, Compare>::
-r_find_insert_position(TYPENAME ordered_vector<Key, Compare>::ITERATOR first,
-                       TYPENAME ordered_vector<Key, Compare>::ITERATOR last,
-                       const TYPENAME ordered_vector<Key, Compare>::KEY_TYPE &key) {
+template<class Key, class Compare, class Vector>
+TYPENAME ordered_vector<Key, Compare, Vector>::ITERATOR ordered_vector<Key, Compare, Vector>::
+r_find_insert_position(TYPENAME ordered_vector<Key, Compare, Vector>::ITERATOR first,
+                       TYPENAME ordered_vector<Key, Compare, Vector>::ITERATOR last,
+                       const TYPENAME ordered_vector<Key, Compare, Vector>::KEY_TYPE &key) {
   if (first == last) {
     // The list is empty; the insert position is the last of the list.
     return last;
@@ -189,12 +189,12 @@ r_find_insert_position(TYPENAME ordered_vector<Key, Compare>::ITERATOR first,
 //       Access: Private
 //  Description: The recursive implementation of find().
 ////////////////////////////////////////////////////////////////////
-template<class Key, class Compare>
-TYPENAME ordered_vector<Key, Compare>::CONST_ITERATOR ordered_vector<Key, Compare>::
-r_find(TYPENAME ordered_vector<Key, Compare>::CONST_ITERATOR first,
-       TYPENAME ordered_vector<Key, Compare>::CONST_ITERATOR last,
-       TYPENAME ordered_vector<Key, Compare>::CONST_ITERATOR not_found,
-       const TYPENAME ordered_vector<Key, Compare>::KEY_TYPE &key) const {
+template<class Key, class Compare, class Vector>
+TYPENAME ordered_vector<Key, Compare, Vector>::CONST_ITERATOR ordered_vector<Key, Compare, Vector>::
+r_find(TYPENAME ordered_vector<Key, Compare, Vector>::CONST_ITERATOR first,
+       TYPENAME ordered_vector<Key, Compare, Vector>::CONST_ITERATOR last,
+       TYPENAME ordered_vector<Key, Compare, Vector>::CONST_ITERATOR not_found,
+       const TYPENAME ordered_vector<Key, Compare, Vector>::KEY_TYPE &key) const {
   if (first == last) {
     // The list is empty; the key is not on the list.
     return not_found;
@@ -222,12 +222,12 @@ r_find(TYPENAME ordered_vector<Key, Compare>::CONST_ITERATOR first,
 //       Access: Private
 //  Description: The recursive implementation of find_particular().
 ////////////////////////////////////////////////////////////////////
-template<class Key, class Compare>
-TYPENAME ordered_vector<Key, Compare>::CONST_ITERATOR ordered_vector<Key, Compare>::
-r_find_particular(TYPENAME ordered_vector<Key, Compare>::CONST_ITERATOR first,
-                  TYPENAME ordered_vector<Key, Compare>::CONST_ITERATOR last,
-                  TYPENAME ordered_vector<Key, Compare>::CONST_ITERATOR not_found,
-                  const TYPENAME ordered_vector<Key, Compare>::KEY_TYPE &key) const {
+template<class Key, class Compare, class Vector>
+TYPENAME ordered_vector<Key, Compare, Vector>::CONST_ITERATOR ordered_vector<Key, Compare, Vector>::
+r_find_particular(TYPENAME ordered_vector<Key, Compare, Vector>::CONST_ITERATOR first,
+                  TYPENAME ordered_vector<Key, Compare, Vector>::CONST_ITERATOR last,
+                  TYPENAME ordered_vector<Key, Compare, Vector>::CONST_ITERATOR not_found,
+                  const TYPENAME ordered_vector<Key, Compare, Vector>::KEY_TYPE &key) const {
   if (first == last) {
     // The list is empty; the key is not on the list.
     return not_found;
@@ -275,12 +275,12 @@ r_find_particular(TYPENAME ordered_vector<Key, Compare>::CONST_ITERATOR first,
 //       Access: Private
 //  Description: The recursive implementation of count().
 ////////////////////////////////////////////////////////////////////
-template<class Key, class Compare>
-TYPENAME ordered_vector<Key, Compare>::SIZE_TYPE ordered_vector<Key, Compare>::
-r_count(TYPENAME ordered_vector<Key, Compare>::CONST_ITERATOR first,
-        TYPENAME ordered_vector<Key, Compare>::CONST_ITERATOR last,
-        const TYPENAME ordered_vector<Key, Compare>::KEY_TYPE &key) const {
-  typedef pair<TYPENAME ordered_vector<Key, Compare>::CONST_ITERATOR, TYPENAME ordered_vector<Key, Compare>::CONST_ITERATOR> pair_type;
+template<class Key, class Compare, class Vector>
+TYPENAME ordered_vector<Key, Compare, Vector>::SIZE_TYPE ordered_vector<Key, Compare, Vector>::
+r_count(TYPENAME ordered_vector<Key, Compare, Vector>::CONST_ITERATOR first,
+        TYPENAME ordered_vector<Key, Compare, Vector>::CONST_ITERATOR last,
+        const TYPENAME ordered_vector<Key, Compare, Vector>::KEY_TYPE &key) const {
+  typedef pair<TYPENAME ordered_vector<Key, Compare, Vector>::CONST_ITERATOR, TYPENAME ordered_vector<Key, Compare, Vector>::CONST_ITERATOR> pair_type;
 
   if (first == last) {
     // The list is empty; the key is not on the list.
@@ -311,11 +311,11 @@ r_count(TYPENAME ordered_vector<Key, Compare>::CONST_ITERATOR first,
 //       Access: Private
 //  Description: The recursive implementation of lower_bound().
 ////////////////////////////////////////////////////////////////////
-template<class Key, class Compare>
-TYPENAME ordered_vector<Key, Compare>::CONST_ITERATOR ordered_vector<Key, Compare>::
-r_lower_bound(TYPENAME ordered_vector<Key, Compare>::CONST_ITERATOR first,
-              TYPENAME ordered_vector<Key, Compare>::CONST_ITERATOR last,
-              const TYPENAME ordered_vector<Key, Compare>::KEY_TYPE &key) const {
+template<class Key, class Compare, class Vector>
+TYPENAME ordered_vector<Key, Compare, Vector>::CONST_ITERATOR ordered_vector<Key, Compare, Vector>::
+r_lower_bound(TYPENAME ordered_vector<Key, Compare, Vector>::CONST_ITERATOR first,
+              TYPENAME ordered_vector<Key, Compare, Vector>::CONST_ITERATOR last,
+              const TYPENAME ordered_vector<Key, Compare, Vector>::KEY_TYPE &key) const {
   if (first == last) {
     // The list is empty; the key is not on the list.
     return last;
@@ -344,11 +344,11 @@ r_lower_bound(TYPENAME ordered_vector<Key, Compare>::CONST_ITERATOR first,
 //       Access: Private
 //  Description: The recursive implementation of upper_bound().
 ////////////////////////////////////////////////////////////////////
-template<class Key, class Compare>
-TYPENAME ordered_vector<Key, Compare>::CONST_ITERATOR ordered_vector<Key, Compare>::
-r_upper_bound(TYPENAME ordered_vector<Key, Compare>::CONST_ITERATOR first,
-              TYPENAME ordered_vector<Key, Compare>::CONST_ITERATOR last,
-              const TYPENAME ordered_vector<Key, Compare>::KEY_TYPE &key) const {
+template<class Key, class Compare, class Vector>
+TYPENAME ordered_vector<Key, Compare, Vector>::CONST_ITERATOR ordered_vector<Key, Compare, Vector>::
+r_upper_bound(TYPENAME ordered_vector<Key, Compare, Vector>::CONST_ITERATOR first,
+              TYPENAME ordered_vector<Key, Compare, Vector>::CONST_ITERATOR last,
+              const TYPENAME ordered_vector<Key, Compare, Vector>::KEY_TYPE &key) const {
   if (first == last) {
     // The list is empty; the key is not on the list.
     return last;
@@ -377,12 +377,12 @@ r_upper_bound(TYPENAME ordered_vector<Key, Compare>::CONST_ITERATOR first,
 //       Access: Private
 //  Description: The recursive implementation of equal_range().
 ////////////////////////////////////////////////////////////////////
-template<class Key, class Compare>
-pair<TYPENAME ordered_vector<Key, Compare>::CONST_ITERATOR, TYPENAME ordered_vector<Key, Compare>::CONST_ITERATOR> ordered_vector<Key, Compare>::
-r_equal_range(TYPENAME ordered_vector<Key, Compare>::CONST_ITERATOR first,
-              TYPENAME ordered_vector<Key, Compare>::CONST_ITERATOR last,
-              const TYPENAME ordered_vector<Key, Compare>::KEY_TYPE &key) const {
-  typedef pair<TYPENAME ordered_vector<Key, Compare>::CONST_ITERATOR, TYPENAME ordered_vector<Key, Compare>::CONST_ITERATOR> pair_type;
+template<class Key, class Compare, class Vector>
+pair<TYPENAME ordered_vector<Key, Compare, Vector>::CONST_ITERATOR, TYPENAME ordered_vector<Key, Compare, Vector>::CONST_ITERATOR> ordered_vector<Key, Compare, Vector>::
+r_equal_range(TYPENAME ordered_vector<Key, Compare, Vector>::CONST_ITERATOR first,
+              TYPENAME ordered_vector<Key, Compare, Vector>::CONST_ITERATOR last,
+              const TYPENAME ordered_vector<Key, Compare, Vector>::KEY_TYPE &key) const {
+  typedef pair<TYPENAME ordered_vector<Key, Compare, Vector>::CONST_ITERATOR, TYPENAME ordered_vector<Key, Compare, Vector>::CONST_ITERATOR> pair_type;
 
   if (first == last) {
     // The list is empty; the key is not on the list.

+ 25 - 28
panda/src/express/ordered_vector.h

@@ -21,15 +21,15 @@
 // on pc cygwin from  3 minutes to 17 seconds ?? really need to explore interigate to figure out what is 
 // going on ..
 //
-template<class Key, class Compare = less<int> > class ov_multiset
+template<class Key, class Compare = less<int>, class Vector = pvector<Key> > class ov_multiset
 {
 };
 
-template<class Key, class Compare = less<int> > class ov_set
+template<class Key, class Compare = less<int>, class Vector = pvector<Key> > class ov_set
 {
 };
 
-template<class Key, class Compare = less<int> > class ordered_vector
+template<class Key, class Compare = less<int>, class Vector = pvector<Key> > class ordered_vector
 {
 };
 
@@ -105,11 +105,8 @@ template<class Key, class Compare = less<int> > class ordered_vector
 //               (4) Random access into the set is easy with the []
 //               operator.
 ////////////////////////////////////////////////////////////////////
-template<class Key, class Compare = less<Key> >
+template<class Key, class Compare = less<Key>, class Vector = pvector<Key> >
 class ordered_vector {
-private:
-  typedef pvector<Key> Vector;
-  
 public:
   // Typedefs
   typedef Key KEY_TYPE;
@@ -152,8 +149,8 @@ public:
   INLINE ordered_vector(TypeHandle type_handle = ov_set_type_handle);
   INLINE ordered_vector(const Compare &compare,
                         TypeHandle type_handle = ov_set_type_handle);
-  INLINE ordered_vector(const ordered_vector<Key, Compare> &copy);
-  INLINE ordered_vector<Key, Compare> &operator = (const ordered_vector<Key, Compare> &copy);
+  INLINE ordered_vector(const ordered_vector<Key, Compare, Vector> &copy);
+  INLINE ordered_vector<Key, Compare, Vector> &operator = (const ordered_vector<Key, Compare, Vector> &copy);
   INLINE ~ordered_vector();
 
   // Iterator access.
@@ -177,13 +174,13 @@ public:
   INLINE bool empty() const;
 
   // Equivalence and lexicographical comparisons.
-  INLINE bool operator == (const ordered_vector<Key, Compare> &other) const;
-  INLINE bool operator != (const ordered_vector<Key, Compare> &other) const;
+  INLINE bool operator == (const ordered_vector<Key, Compare, Vector> &other) const;
+  INLINE bool operator != (const ordered_vector<Key, Compare, Vector> &other) const;
 
-  INLINE bool operator < (const ordered_vector<Key, Compare> &other) const;
-  INLINE bool operator > (const ordered_vector<Key, Compare> &other) const;
-  INLINE bool operator <= (const ordered_vector<Key, Compare> &other) const;
-  INLINE bool operator >= (const ordered_vector<Key, Compare> &other) const;
+  INLINE bool operator < (const ordered_vector<Key, Compare, Vector> &other) const;
+  INLINE bool operator > (const ordered_vector<Key, Compare, Vector> &other) const;
+  INLINE bool operator <= (const ordered_vector<Key, Compare, Vector> &other) const;
+  INLINE bool operator >= (const ordered_vector<Key, Compare, Vector> &other) const;
 
   // Insert operations.
   ITERATOR insert_unique(ITERATOR position, const VALUE_TYPE &key);
@@ -213,7 +210,7 @@ public:
   INLINE pair<CONST_ITERATOR, CONST_ITERATOR> equal_range(const KEY_TYPE &key) const;
 
   // Special operations.
-  INLINE void swap(ordered_vector<Key, Compare> &other);
+  INLINE void swap(ordered_vector<Key, Compare, Vector> &other);
   INLINE void reserve(SIZE_TYPE n);
   INLINE void sort_unique();
   INLINE void sort_nonunique();
@@ -273,17 +270,17 @@ private:
 //               standard STL set: one copy of each element is
 //               allowed.
 ////////////////////////////////////////////////////////////////////
-template<class Key, class Compare = less<Key> >
-class ov_set : public ordered_vector<Key, Compare> {
+template<class Key, class Compare = less<Key>, class Vector = pvector<Key> >
+class ov_set : public ordered_vector<Key, Compare, Vector> {
 public:
-  typedef TYPENAME ordered_vector<Key, Compare>::ITERATOR ITERATOR;
-  typedef TYPENAME ordered_vector<Key, Compare>::VALUE_TYPE VALUE_TYPE;
+  typedef TYPENAME ordered_vector<Key, Compare, Vector>::ITERATOR ITERATOR;
+  typedef TYPENAME ordered_vector<Key, Compare, Vector>::VALUE_TYPE VALUE_TYPE;
 
   INLINE ov_set(TypeHandle type_handle = ov_set_type_handle);
   INLINE ov_set(const Compare &compare,
                 TypeHandle type_handle = ov_set_type_handle);
-  INLINE ov_set(const ov_set<Key, Compare> &copy);
-  INLINE ov_set<Key, Compare> &operator = (const ov_set<Key, Compare> &copy);
+  INLINE ov_set(const ov_set<Key, Compare, Vector> &copy);
+  INLINE ov_set<Key, Compare, Vector> &operator = (const ov_set<Key, Compare, Vector> &copy);
 
   INLINE ITERATOR insert(ITERATOR position, const VALUE_TYPE &key0);
   INLINE pair<ITERATOR, bool> insert(const VALUE_TYPE &key0);
@@ -298,17 +295,17 @@ public:
 //               standard STL set: many copies of each element are
 //               allowed.
 ////////////////////////////////////////////////////////////////////
-template<class Key, class Compare = less<Key> >
-class ov_multiset : public ordered_vector<Key, Compare> {
+template<class Key, class Compare = less<Key>, class Vector = pvector<Key> >
+class ov_multiset : public ordered_vector<Key, Compare, Vector> {
 public:
-  typedef TYPENAME ordered_vector<Key, Compare>::ITERATOR ITERATOR;
-  typedef TYPENAME ordered_vector<Key, Compare>::VALUE_TYPE VALUE_TYPE;
+  typedef TYPENAME ordered_vector<Key, Compare, Vector>::ITERATOR ITERATOR;
+  typedef TYPENAME ordered_vector<Key, Compare, Vector>::VALUE_TYPE VALUE_TYPE;
 
   INLINE ov_multiset(TypeHandle type_handle = ov_set_type_handle);
   INLINE ov_multiset(const Compare &compare,
                      TypeHandle type_handle = ov_set_type_handle);
-  INLINE ov_multiset(const ov_multiset<Key, Compare> &copy);
-  INLINE ov_multiset<Key, Compare> &operator = (const ov_multiset<Key, Compare> &copy);
+  INLINE ov_multiset(const ov_multiset<Key, Compare, Vector> &copy);
+  INLINE ov_multiset<Key, Compare, Vector> &operator = (const ov_multiset<Key, Compare, Vector> &copy);
 
   INLINE ITERATOR insert(ITERATOR position, const VALUE_TYPE &key);
   INLINE ITERATOR insert(const VALUE_TYPE &key);

+ 1 - 1
panda/src/gobj/geomVertexData.cxx

@@ -369,7 +369,7 @@ unclean_set_format(const GeomVertexFormat *format) {
   // Assign the new format.
   cdataw->_format = format;
 
-  for (int ai = 0; ai < cdataw->_arrays.size(); ++ai) {
+  for (size_t ai = 0; ai < cdataw->_arrays.size(); ++ai) {
     PT(GeomVertexArrayData) array_obj = cdataw->_arrays[ai].get_write_pointer();
     array_obj->_array_format = format->get_array(ai);
   }

+ 1 - 1
panda/src/gobj/shader.I

@@ -866,7 +866,7 @@ get_filename_from_index(int index, ShaderType type) const {
       return fn;
     }
   } else if (glsl_preprocess && index > 2048 &&
-             (index - 2048) < _included_files.size()) {
+             (index - 2048) < (int)_included_files.size()) {
     return _included_files[index - 2048];
   }
   // Must be a mistake.  Quietly put back the integer.

+ 1 - 1
panda/src/gobj/shader.cxx

@@ -643,7 +643,7 @@ compile_parameter(const ShaderArgId        &arg_id,
     }
 
     bind._name = InternalName::get_root();
-    for (int i = 1; i < pieces.size(); ++i) {
+    for (size_t i = 1; i < pieces.size(); ++i) {
       bind._name = bind._name->append(pieces[i]);
     }
     _var_spec.push_back(bind);

+ 1 - 1
panda/src/gobj/shader.h

@@ -307,7 +307,7 @@ public:
     void *_ptr;
     ShaderPtrType _type;
     bool _updated;
-    int _size; //number of elements vec3[4]=12
+    size_t _size; //number of elements vec3[4]=12
 
   public:
     INLINE ShaderPtrData();

+ 3 - 3
panda/src/gobj/texture.cxx

@@ -3325,7 +3325,7 @@ do_load_one(CData *cdata, const PfmFile &pfm, const string &name, int z, int n,
 ////////////////////////////////////////////////////////////////////
 bool Texture::
 do_load_sub_image(CData *cdata, const PNMImage &image, int x, int y, int z, int n) {
-  nassertr(n >= 0 && n < cdata->_ram_images.size(), false);
+  nassertr(n >= 0 && (size_t)n < cdata->_ram_images.size(), false);
 
   int tex_x_size = do_get_expected_mipmap_x_size(cdata, n);
   int tex_y_size = do_get_expected_mipmap_y_size(cdata, n);
@@ -4378,11 +4378,11 @@ do_make_ram_mipmap_image(CData *cdata, int n) {
   if (cdata->_has_clear_color) {
     // Fill the image with the clear color.
     unsigned char pixel[16];
-    const int pixel_size = do_get_clear_data(cdata, pixel);
+    const size_t pixel_size = (size_t)do_get_clear_data(cdata, pixel);
     nassertr(pixel_size > 0, cdata->_ram_images[n]._image);
 
     unsigned char *image_data = cdata->_ram_images[n]._image;
-    for (int i = 0; i < image_size; i += pixel_size) {
+    for (size_t i = 0; i < image_size; i += pixel_size) {
       memcpy(image_data + i, pixel, pixel_size);
     }
   }

+ 1 - 1
panda/src/gobj/transformBlend.cxx

@@ -109,7 +109,7 @@ limit_transforms(int max_transforms) {
     return;
   }
 
-  while (_entries.size() > max_transforms) {
+  while ((int)_entries.size() > max_transforms) {
     // Repeatedly find and remove the least-important transform.
     nassertv(!_entries.empty());
     Entries::iterator ei_least = _entries.begin();

+ 1 - 1
panda/src/mathutil/triangulator.cxx

@@ -287,7 +287,7 @@ cleanup_polygon_indices(vector_int &polygon) {
   // First, check for index bounds.
   size_t pi = 0;
   while (pi < polygon.size()) {
-    if (polygon[pi] >= 0 && polygon[pi] < _vertices.size()) {
+    if (polygon[pi] >= 0 && (size_t)polygon[pi] < _vertices.size()) {
       // This vertex is OK.
       ++pi;
     } else {

+ 5 - 5
panda/src/pgraph/cullBinManager.h

@@ -97,17 +97,17 @@ private:
 
   class EXPCL_PANDA_PGRAPH BinDefinition {
   public:
+#ifndef NDEBUG
+    LColorf _flash_color;
+    bool _flash_active;
+#endif
     bool _in_use;
     string _name;
     BinType _type;
     int _sort;
     bool _active;
-#ifndef NDEBUG
-    bool _flash_active;
-    LColorf _flash_color;
-#endif
   };
-  typedef pvector<BinDefinition> BinDefinitions;
+  typedef epvector<BinDefinition> BinDefinitions;
   BinDefinitions _bin_definitions;
 
   class SortBins {

+ 3 - 2
panda/src/pgraph/textureAttrib.h

@@ -23,6 +23,7 @@
 #include "updateSeq.h"
 #include "ordered_vector.h"
 #include "vector_int.h"
+#include "epvector.h"
 
 ////////////////////////////////////////////////////////////////////
 //       Class : TextureAttrib
@@ -109,9 +110,9 @@ private:
                      unsigned int implicit_sort = 0,
                      int override = 0);
 
+    SamplerState _sampler;
     PT(TextureStage) _stage;
     PT(Texture) _texture;
-    SamplerState _sampler;
     bool _has_sampler;
     int _ff_tc_index;
     unsigned int _implicit_sort;
@@ -133,7 +134,7 @@ private:
     INLINE bool operator () (const TextureAttrib::StageNode &a, const TextureAttrib::StageNode &b) const;
   };
 
-  typedef ov_set<StageNode, CompareTextureStagePointer> Stages;
+  typedef ov_set<StageNode, CompareTextureStagePointer, epvector<StageNode> > Stages;
   Stages _on_stages;  // set of all "on" stages, indexed by pointer.
 
   typedef pvector<StageNode *> RenderStages;

+ 1 - 1
panda/src/pgraphnodes/computeNode.I

@@ -73,7 +73,7 @@ get_num_dispatches() const {
 INLINE const LVecBase3i &ComputeNode::
 get_dispatch(int n) const {
   Dispatcher::CDReader cdata(_dispatcher->_cycler);
-  nassertr(n >= 0 && n < cdata->_dispatches.size(), LVecBase3i::zero());
+  nassertr(n >= 0 && (size_t)n < cdata->_dispatches.size(), LVecBase3i::zero());
   return cdata->_dispatches[n];
 }
 

+ 3 - 3
pandatool/src/daeegg/daeMaterials.cxx

@@ -158,7 +158,7 @@ process_texture_bucket(const string semantic, const FCDEffectStandard* effect_co
         string uvset_semantic (FROM_FSTRING(uvset->GetSemantic()));
 
         // Only set the UV name if this UV set actually exists.
-        for (int i = 0; i < _materials[semantic]->_uvsets.size(); ++i) {
+        for (size_t i = 0; i < _materials[semantic]->_uvsets.size(); ++i) {
           if (_materials[semantic]->_uvsets[i]->_semantic == uvset_semantic) {
             egg_texture->set_uv_name(uvset_semantic);
             break;
@@ -273,7 +273,7 @@ get_uvset_name(const string semantic, FUDaeGeometryInput::Semantic input_semanti
     if (input_set == -1 && _materials[semantic]->_uvsets.size() == 1) {
       return _materials[semantic]->_uvsets[0]->_semantic;
     } else {
-      for (int i = 0; i < _materials[semantic]->_uvsets.size(); ++i) {
+      for (size_t i = 0; i < _materials[semantic]->_uvsets.size(); ++i) {
         if (_materials[semantic]->_uvsets[i]->_input_set == input_set &&
             _materials[semantic]->_uvsets[i]->_input_semantic == input_semantic) {
           return _materials[semantic]->_uvsets[i]->_semantic;
@@ -283,7 +283,7 @@ get_uvset_name(const string semantic, FUDaeGeometryInput::Semantic input_semanti
       // input_semantic this time. The reason for this is that some tools
       // export textangents and texbinormals bound to a uvset with input
       // semantic TEXCOORD.
-      for (int i = 0; i < _materials[semantic]->_uvsets.size(); ++i) {
+      for (size_t i = 0; i < _materials[semantic]->_uvsets.size(); ++i) {
         if (_materials[semantic]->_uvsets[i]->_input_set == input_set) {
           daeegg_cat.debug() << "Using uv set with non-matching input semantic " << _materials[semantic]->_uvsets[i]->_semantic << "\n";
           return _materials[semantic]->_uvsets[i]->_semantic;

+ 4 - 3
pandatool/src/palettizer/paletteImage.cxx

@@ -322,7 +322,7 @@ place(TexturePlacement *placement) {
     // [gjeon] create swappedImages
     TexturePlacement::TextureSwaps::iterator tsi;
     for (tsi = placement->_textureSwaps.begin(); tsi != placement->_textureSwaps.end(); ++tsi) {
-      if ((tsi - placement->_textureSwaps.begin()) >= _swappedImages.size()) {
+      if ((tsi - placement->_textureSwaps.begin()) >= (int)_swappedImages.size()) {
         PaletteImage *swappedImage = new PaletteImage(_page, _swappedImages.size(), tsi - placement->_textureSwaps.begin() + 1);
         swappedImage->_masterPlacements = &_placements;
         _swappedImages.push_back(swappedImage);
@@ -1010,10 +1010,11 @@ get_swapped_image(int index) {
   Placements::iterator pi;
   for (pi = _masterPlacements->begin(); pi != _masterPlacements->end(); ++pi) {
     TexturePlacement *placement = (*pi);
-    if (placement->_textureSwaps.size() > index)
+    if ((int)placement->_textureSwaps.size() > index) {
       placement->fill_swapped_image(_image, index);
-    else
+    } else {
       placement->fill_image(_image);
+    }
   }
 }