mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Fix size bug in PackedList operator=, spotted by Mattijs.
- the size_ was not being adjusted in two assignment operators:
PackedList<nBits>::operator=(const PackedList<nBits>&)
PackedList<nBits>::operator=(const UList<label>&)
This commit is contained in:
@ -267,8 +267,8 @@ Foam::Ostream& Foam::PackedList<nBits>::print(Ostream& os) const
|
||||
template<unsigned nBits>
|
||||
void Foam::PackedList<nBits>::operator=(const PackedList<nBits>& lst)
|
||||
{
|
||||
setCapacity(lst.size());
|
||||
StorageList::operator=(lst);
|
||||
size_ = lst.size();
|
||||
}
|
||||
|
||||
|
||||
@ -276,6 +276,7 @@ template<unsigned nBits>
|
||||
void Foam::PackedList<nBits>::operator=(const UList<label>& lst)
|
||||
{
|
||||
setCapacity(lst.size());
|
||||
size_ = lst.size();
|
||||
|
||||
forAll(lst, i)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user