From ffc09d830b11e824f4a71d2153714f50e52a405f Mon Sep 17 00:00:00 2001 From: Will Bainbridge Date: Thu, 4 Jan 2024 10:16:21 +0000 Subject: [PATCH] HashList: Clear entire table on resizeAndClear --- src/OpenFOAM/containers/HashTables/HashList/HashList.C | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) 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(); }