Import Geant4 10.6.0 source tree
This commit is contained in:
@@ -103,6 +103,19 @@ inline void sort_by_second(std::vector< std::pair<K,V> >& a_vec){
|
||||
a_vec = v;
|
||||
}
|
||||
|
||||
template <class K,class V>
|
||||
inline bool remove(std::vector< std::pair<K,V> >& a_vec,const K& a_key) {
|
||||
typedef typename std::vector< std::pair<K,V> >::iterator it_t;
|
||||
it_t it;
|
||||
for(it=a_vec.begin();it!=a_vec.end();++it) {
|
||||
if((*it).first==a_key) {
|
||||
a_vec.erase(it);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
template <class K,class V>
|
||||
inline bool remove(std::vector< std::pair<K,V> >& a_vec,const K& a_key,bool a_delete) {
|
||||
typedef typename std::vector< std::pair<K,V> >::iterator it_t;
|
||||
|
||||
Reference in New Issue
Block a user