From cd98d6a90689020e2ec5db47c864dbb495b48b87 Mon Sep 17 00:00:00 2001 From: Will Bainbridge Date: Tue, 25 Jan 2022 09:25:40 +0000 Subject: [PATCH] surfaceWriter: Corrected field count in variadic interface --- src/sampling/sampledSurface/writers/surfaceWriter.H | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/sampling/sampledSurface/writers/surfaceWriter.H b/src/sampling/sampledSurface/writers/surfaceWriter.H index d8e46f2b96..726b575012 100644 --- a/src/sampling/sampledSurface/writers/surfaceWriter.H +++ b/src/sampling/sampledSurface/writers/surfaceWriter.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -231,11 +231,9 @@ public: const Args& ... args ) const { - const label nFields = sizeof...(Args)/2; - - wordList fieldNames(nFields); + wordList fieldNames; #define DeclareFieldTypeValues(Type, nullArg) \ - UPtrList> field##Type##Values(nFields); + UPtrList> field##Type##Values; FOR_ALL_FIELD_TYPES(DeclareFieldTypeValues); #undef DeclareFieldTypeValues