diff --git a/src/OpenFOAM/containers/HashTables/HashList/HashList.C b/src/OpenFOAM/containers/HashTables/HashList/HashList.C index 39a2efe78b..c26933e34b 100644 --- a/src/OpenFOAM/containers/HashTables/HashList/HashList.C +++ b/src/OpenFOAM/containers/HashTables/HashList/HashList.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2022-2023 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2022-2024 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -65,11 +65,9 @@ void Foam::HashList::clear() template void Foam::HashList::resizeAndClear(const label newSize) { - List>::resize - ( - newSize, - Tuple2(nullKey, Type()) - ); + List>::resize(newSize); + + clear(); }