mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
HashSet - use AnyType, AnyHash templates as per HashTable
- this probably should have been in commit c7c9a6e0 (2009-11-04)
but got overseen in the HashTbl -> HashTable switch
This commit is contained in:
@ -44,14 +44,18 @@ Foam::HashSet<Key, Hash>::HashSet(const UList<Key>& lst)
|
|||||||
|
|
||||||
|
|
||||||
template<class Key, class Hash>
|
template<class Key, class Hash>
|
||||||
template<class AnyType>
|
template<class AnyType, class AnyHash>
|
||||||
Foam::HashSet<Key, Hash>::HashSet(const HashTable<AnyType, Key, Hash>& h)
|
Foam::HashSet<Key, Hash>::HashSet
|
||||||
|
(
|
||||||
|
const HashTable<AnyType, Key, AnyHash>& h
|
||||||
|
)
|
||||||
:
|
:
|
||||||
HashTable<nil, Key, Hash>(h.size())
|
HashTable<nil, Key, Hash>(h.size())
|
||||||
{
|
{
|
||||||
for
|
for
|
||||||
(
|
(
|
||||||
typename HashTable<AnyType, Key, Hash>::const_iterator cit = h.cbegin();
|
typename HashTable<AnyType, Key, AnyHash>::const_iterator
|
||||||
|
cit = h.cbegin();
|
||||||
cit != h.cend();
|
cit != h.cend();
|
||||||
++cit
|
++cit
|
||||||
)
|
)
|
||||||
|
|||||||
@ -106,8 +106,8 @@ public:
|
|||||||
|
|
||||||
//- Construct from the keys of another HashTable,
|
//- Construct from the keys of another HashTable,
|
||||||
// the type of values held is arbitrary.
|
// the type of values held is arbitrary.
|
||||||
template<class AnyType>
|
template<class AnyType, class AnyHash>
|
||||||
HashSet(const HashTable<AnyType, Key, Hash>&);
|
HashSet(const HashTable<AnyType, Key, AnyHash>&);
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user