From cf91655422b330ee98a1c7c1c94e551339006786 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Thu, 11 Apr 2019 16:20:53 +0200 Subject: [PATCH] STYLE: remove unneeded, rarely used construct/assign List from BiIndirectList - the only code location using BiIndirectList are debug sections within polyTopoChange. No need to construct/assign directly from a BiIndirectList since the '()' method provides a simple alternative. --- src/OpenFOAM/containers/Lists/List/List.C | 32 +------------------ src/OpenFOAM/containers/Lists/List/List.H | 7 ---- .../polyTopoChange/removePoints.C | 2 +- 3 files changed, 2 insertions(+), 39 deletions(-) diff --git a/src/OpenFOAM/containers/Lists/List/List.C b/src/OpenFOAM/containers/Lists/List/List.C index 2eb90c7616..f5e5a31208 100644 --- a/src/OpenFOAM/containers/Lists/List/List.C +++ b/src/OpenFOAM/containers/Lists/List/List.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2017-2018 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2017-2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2016 OpenFOAM Foundation @@ -32,7 +32,6 @@ License #include "SLList.H" #include "IndirectList.H" #include "UIndirectList.H" -#include "BiIndirectList.H" #include "contiguous.H" #include @@ -340,16 +339,6 @@ Foam::List::List(const UIndirectList& list) } -template -Foam::List::List(const BiIndirectList& list) -: - UList(nullptr, list.size()) -{ - doAlloc(); - copyList(list); -} - - template Foam::List::List(std::initializer_list list) : @@ -540,25 +529,6 @@ void Foam::List::operator=(const UIndirectList& list) } -template -void Foam::List::operator=(const BiIndirectList& list) -{ - const label len = list.size(); - - reAlloc(len); - - if (len) - { - List_ACCESS(T, (*this), vp); - - for (label i=0; i void Foam::List::operator=(std::initializer_list list) { diff --git a/src/OpenFOAM/containers/Lists/List/List.H b/src/OpenFOAM/containers/Lists/List/List.H index 7a8a2cb863..7bb8fe4083 100644 --- a/src/OpenFOAM/containers/Lists/List/List.H +++ b/src/OpenFOAM/containers/Lists/List/List.H @@ -67,7 +67,6 @@ template class PtrList; template class SortableList; template class IndirectList; template class UIndirectList; -template class BiIndirectList; template Istream& operator>>(Istream& is, List& list); @@ -173,9 +172,6 @@ public: //- Construct as copy of UIndirectList explicit List(const UIndirectList& list); - //- Construct as copy of BiIndirectList - explicit List(const BiIndirectList& list); - //- Construct from an initializer list List(std::initializer_list list); @@ -273,9 +269,6 @@ public: //- Assignment to UIndirectList operator. Takes linear time void operator=(const UIndirectList& list); - //- Assignment to BiIndirectList operator. Takes linear time - void operator=(const BiIndirectList& list); - //- Assignment to an initializer list void operator=(std::initializer_list list); diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/removePoints.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/removePoints.C index 8d0f011b75..f910b91574 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/removePoints.C +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/removePoints.C @@ -430,7 +430,7 @@ void Foam::removePoints::setRefinement mesh_.points(), savedPoints_, savedFaces_[saveI] // saved face - ) + )() ); if (meshPoints != keptPoints)