From fe0b71280ee336e5176d8f841fa0736c448f58b9 Mon Sep 17 00:00:00 2001 From: mattijs <mattijs> Date: Wed, 16 Oct 2024 15:05:32 +0100 Subject: [PATCH] ENH: octree: avoid copy --- src/OpenFOAM/algorithms/indexedOctree/indexedOctree.C | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/OpenFOAM/algorithms/indexedOctree/indexedOctree.C b/src/OpenFOAM/algorithms/indexedOctree/indexedOctree.C index 56aaaf48385..10cb418a8a4 100644 --- a/src/OpenFOAM/algorithms/indexedOctree/indexedOctree.C +++ b/src/OpenFOAM/algorithms/indexedOctree/indexedOctree.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2016-2022 OpenCFD Ltd. + Copyright (C) 2016-2024 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -2661,7 +2661,7 @@ Foam::label Foam::indexedOctree<Type>::findInside(const point& sample) const // Need to check for the presence of content, in-case the node is empty if (isContent(contentIndex)) { - labelList indices = contents_[getContent(contentIndex)]; + const labelList& indices = contents_[getContent(contentIndex)]; forAll(indices, elemI) { -- GitLab