HashList: Clear entire table on resizeAndClear
This commit is contained in:
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2022-2023 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2022-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -65,11 +65,9 @@ void Foam::HashList<Type, Key, Hash>::clear()
|
|||||||
template<class Type, class Key, class Hash>
|
template<class Type, class Key, class Hash>
|
||||||
void Foam::HashList<Type, Key, Hash>::resizeAndClear(const label newSize)
|
void Foam::HashList<Type, Key, Hash>::resizeAndClear(const label newSize)
|
||||||
{
|
{
|
||||||
List<Tuple2<Key, Type>>::resize
|
List<Tuple2<Key, Type>>::resize(newSize);
|
||||||
(
|
|
||||||
newSize,
|
clear();
|
||||||
Tuple2<Key, Type>(nullKey, Type())
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user