From 4ec52a5d419b6f82b2ebcf19b306f43570d3c0aa Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Fri, 21 Apr 2023 17:40:48 +0100 Subject: [PATCH] Updates for Clang --- .../fields/Fields/UniformField/UniformFieldI.H | 10 +++++----- src/OpenFOAM/primitives/one/oneI.H | 12 ++++++------ src/OpenFOAM/primitives/zero/zeroI.H | 12 ++++++------ 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/OpenFOAM/fields/Fields/UniformField/UniformFieldI.H b/src/OpenFOAM/fields/Fields/UniformField/UniformFieldI.H index e34e83e7d9..5f9ee0fb54 100644 --- a/src/OpenFOAM/fields/Fields/UniformField/UniformFieldI.H +++ b/src/OpenFOAM/fields/Fields/UniformField/UniformFieldI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2013-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -74,14 +74,14 @@ inline UniformField min template -inline OtherType min(const UniformField& u, const OtherType& o) +inline auto min(const UniformField& u, const OtherType& o) { return min(u.operator Type(), o); } template -inline OtherType min(const OtherType& o, const UniformField& u) +inline auto min(const OtherType& o, const UniformField& u) { return min(o, u.operator Type()); } @@ -99,14 +99,14 @@ inline UniformField max template -inline OtherType max(const UniformField& u, const OtherType& o) +inline auto max(const UniformField& u, const OtherType& o) { return max(u.operator Type(), o); } template -inline OtherType max(const OtherType& o, const UniformField& u) +inline auto max(const OtherType& o, const UniformField& u) { return max(o, u.operator Type()); } diff --git a/src/OpenFOAM/primitives/one/oneI.H b/src/OpenFOAM/primitives/one/oneI.H index 7bda0c58bc..28621a3c75 100644 --- a/src/OpenFOAM/primitives/one/oneI.H +++ b/src/OpenFOAM/primitives/one/oneI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -90,7 +90,7 @@ inline const one& operator/(const one& o, const one&) } template -inline Type operator/(const one&, const Type& t) +inline auto operator/(const one&, const Type& t) { return scalar(1)/t; } @@ -107,13 +107,13 @@ inline const one& min(const one& o, const one&) } template -inline Type min(const one&, const Type& t) +inline auto min(const one&, const Type& t) { return min(scalar(1), t); } template -inline Type min(const Type& t, const one&) +inline auto min(const Type& t, const one&) { return min(t, scalar(1)); } @@ -124,13 +124,13 @@ inline const one& max(const one& o, const one&) } template -inline Type max(const one&, const Type& t) +inline auto max(const one&, const Type& t) { return max(scalar(1), t); } template -inline Type max(const Type& t, const one&) +inline auto max(const Type& t, const one&) { return max(t, scalar(1)); } diff --git a/src/OpenFOAM/primitives/zero/zeroI.H b/src/OpenFOAM/primitives/zero/zeroI.H index 83c1eacfa0..5d43fbef4c 100644 --- a/src/OpenFOAM/primitives/zero/zeroI.H +++ b/src/OpenFOAM/primitives/zero/zeroI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -62,7 +62,7 @@ inline const Type& operator-(const Type& t, const zero&) } template -inline Type operator-(const zero&, const Type& t) +inline auto operator-(const zero&, const Type& t) { return -t; } @@ -96,13 +96,13 @@ inline zero min(const zero&, const zero&) } template -inline Type min(const zero&, const Type& t) +inline auto min(const zero&, const Type& t) { return min(scalar(0), t); } template -inline Type min(const Type& t, const zero&) +inline auto min(const Type& t, const zero&) { return min(t, scalar(0)); } @@ -113,13 +113,13 @@ inline zero max(const zero&, const zero&) } template -inline Type max(const zero&, const Type& t) +inline auto max(const zero&, const Type& t) { return max(scalar(0), t); } template -inline Type max(const Type& t, const zero&) +inline auto max(const Type& t, const zero&) { return max(t, scalar(0)); }