From 91b08e5ddf3824aceb97346a3191e1e210715480 Mon Sep 17 00:00:00 2001 From: Sean McLeod Date: Tue, 8 Oct 2024 22:03:06 +0200 Subject: [PATCH] Use make_MathFn and round directly for single argument case Co-authored-by: Bertrand Coconnier --- src/math/FGFunction.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/math/FGFunction.cpp b/src/math/FGFunction.cpp index fd863fad9..4925b82ae 100644 --- a/src/math/FGFunction.cpp +++ b/src/math/FGFunction.cpp @@ -533,7 +533,7 @@ void FGFunction::Load(Element* el, FGPropertyValue* var, FGFDMExec* fdmex, return round((p[0]->GetValue() / multiple)) * multiple; }; if (element->GetNumElements() == 1) - Parameters.push_back(new aFunc(f, fdmex, element, Prefix, var)); + Parameters.push_back(make_MathFn(round, fdmex, element, Prefix, var)); else Parameters.push_back(new aFunc(f, fdmex, element, Prefix, var)); } else if (operation == "atan2") {