mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 18:31:55 -04:00
add insert_unverified
This commit is contained in:
parent
9f198514ce
commit
9ed9038098
@ -337,7 +337,7 @@ insert_unique(const TYPENAME ordered_vector<Key, Compare>::VALUE_TYPE &key) {
|
|||||||
// the appropriate place. If there are already elements
|
// the appropriate place. If there are already elements
|
||||||
// sorting equivalent to the key in the vector, the new
|
// sorting equivalent to the key in the vector, the new
|
||||||
// value is inserted following them.
|
// value is inserted following them.
|
||||||
|
//
|
||||||
// The return value is the iterator referencing the new
|
// The return value is the iterator referencing the new
|
||||||
// element.
|
// element.
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
@ -353,6 +353,23 @@ insert_nonunique(const TYPENAME ordered_vector<Key, Compare>::VALUE_TYPE &key) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
// Function: ordered_vector::insert_unverified
|
||||||
|
// Access: Public
|
||||||
|
// Description: Inserts the indicated key into the ordered vector at
|
||||||
|
// the indicated place. The user is trusted to have
|
||||||
|
// 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) {
|
||||||
|
TAU_PROFILE("ordered_vector::insert_unverified(iterator, const value_type &)", " ", TAU_USER);
|
||||||
|
ITERATOR result = _vector.insert(position, key);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
// Function: ordered_vector::erase, with iterator
|
// Function: ordered_vector::erase, with iterator
|
||||||
// Access: Public
|
// Access: Public
|
||||||
|
@ -192,6 +192,7 @@ public:
|
|||||||
ITERATOR insert_nonunique(ITERATOR position, const VALUE_TYPE &key);
|
ITERATOR insert_nonunique(ITERATOR position, const VALUE_TYPE &key);
|
||||||
INLINE pair<ITERATOR, bool> insert_unique(const VALUE_TYPE &key);
|
INLINE pair<ITERATOR, bool> insert_unique(const VALUE_TYPE &key);
|
||||||
INLINE ITERATOR insert_nonunique(const VALUE_TYPE &key);
|
INLINE ITERATOR insert_nonunique(const VALUE_TYPE &key);
|
||||||
|
INLINE ITERATOR insert_unverified(ITERATOR position, const VALUE_TYPE &key);
|
||||||
|
|
||||||
// Erase operations.
|
// Erase operations.
|
||||||
INLINE ITERATOR erase(ITERATOR position);
|
INLINE ITERATOR erase(ITERATOR position);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user