mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: support HashTable erasure via a FixedList
- propagate common erasure methods as HashSet::unset() method, for symmetry with HashSet::set()
This commit is contained in:
@ -64,8 +64,8 @@ class HashSet
|
||||
|
||||
public:
|
||||
|
||||
typedef typename HashTable<nil, Key, Hash>::iterator iterator;
|
||||
typedef typename HashTable<nil, Key, Hash>::const_iterator const_iterator;
|
||||
using iterator = typename HashTable<nil, Key, Hash>::iterator;
|
||||
using const_iterator = typename HashTable<nil, Key, Hash>::const_iterator;
|
||||
|
||||
|
||||
// Constructors
|
||||
@ -154,6 +154,25 @@ public:
|
||||
return HashTable<nil, Key, Hash>::erase(key);
|
||||
}
|
||||
|
||||
//- Unset the listed keys - same as erase
|
||||
label unset(const UList<Key>& lst)
|
||||
{
|
||||
return HashTable<nil, Key, Hash>::erase(lst);
|
||||
}
|
||||
|
||||
//- Unset the listed keys - same as erase
|
||||
template<unsigned Size>
|
||||
label unset(const FixedList<Key, Size>& lst)
|
||||
{
|
||||
return HashTable<nil, Key, Hash>::erase(lst);
|
||||
}
|
||||
|
||||
//- Unset the listed keys - same as erase
|
||||
label unset(std::initializer_list<Key> lst)
|
||||
{
|
||||
return HashTable<nil, Key, Hash>::erase(lst);
|
||||
}
|
||||
|
||||
|
||||
// Member Operators
|
||||
|
||||
|
||||
Reference in New Issue
Block a user