mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: revert bitSet/HashSet setMany() to set() method (issue #837)
- improves backward compatibility and more naming consistency. Retain setMany(iter1, iter2) to avoid ambiguity with the PackedList::set(index, value) method.
This commit is contained in:
@ -444,7 +444,7 @@ inline Foam::label Foam::HashTable<T, Key, Hash>::erase
|
||||
|
||||
template<class T, class Key, class Hash>
|
||||
template<unsigned Size>
|
||||
inline Foam::label Foam::HashTable<T, Key, Hash>::eraseMany
|
||||
inline Foam::label Foam::HashTable<T, Key, Hash>::erase
|
||||
(
|
||||
const FixedList<Key, Size>& keys
|
||||
)
|
||||
@ -454,7 +454,7 @@ inline Foam::label Foam::HashTable<T, Key, Hash>::eraseMany
|
||||
|
||||
|
||||
template<class T, class Key, class Hash>
|
||||
inline Foam::label Foam::HashTable<T, Key, Hash>::eraseMany
|
||||
inline Foam::label Foam::HashTable<T, Key, Hash>::erase
|
||||
(
|
||||
const UList<Key>& keys
|
||||
)
|
||||
@ -766,9 +766,9 @@ void Foam::HashTable<T, Key, Hash>::operator=
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
// Could be zero-sized from a previous transfer()
|
||||
if (!capacity_)
|
||||
{
|
||||
// Zero-sized from a previous transfer()?
|
||||
resize(rhs.capacity_);
|
||||
}
|
||||
else
|
||||
@ -789,9 +789,9 @@ void Foam::HashTable<T, Key, Hash>::operator=
|
||||
std::initializer_list<std::pair<Key, T>> rhs
|
||||
)
|
||||
{
|
||||
// Could be zero-sized from a previous transfer()
|
||||
if (!capacity_)
|
||||
{
|
||||
// Zero-sized from a previous transfer()?
|
||||
resize(2*rhs.size());
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user