From d77e77f9f4fcbc8eb34fd3908c53879c6e7a6894 Mon Sep 17 00:00:00 2001 From: Furgo <148809153+furgo16@users.noreply.github.com> Date: Fri, 7 Nov 2025 14:35:25 +0100 Subject: [PATCH] App: Replace getAttributeAs{Integer,Float} with templated getAttribute Template was introduced in https://github.com/FreeCAD/FreeCAD/pull/19907 --- src/App/PropertyStandard.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/App/PropertyStandard.cpp b/src/App/PropertyStandard.cpp index fbf7da46d3..ce5652e2b6 100644 --- a/src/App/PropertyStandard.cpp +++ b/src/App/PropertyStandard.cpp @@ -790,22 +790,22 @@ void PropertyIntegerConstraint::Restore(Base::XMLReader& reader) // read my Element reader.readElement("Integer"); // get the value of my Attribute - setValue(reader.getAttributeAsInteger("value")); + setValue(reader.getAttribute("value")); bool createConstraint = false; long minimum = std::numeric_limits::lowest(); long maximum = std::numeric_limits::max(); long stepsize = 1.0; if (reader.hasAttribute("min")) { - minimum = reader.getAttributeAsInteger("min"); + minimum = reader.getAttribute("min"); createConstraint = true; } if (reader.hasAttribute("max")) { - maximum = reader.getAttributeAsInteger("max"); + maximum = reader.getAttribute("max"); createConstraint = true; } if (reader.hasAttribute("step")) { - stepsize = reader.getAttributeAsInteger("step"); + stepsize = reader.getAttribute("step"); } if (createConstraint) { @@ -1340,22 +1340,22 @@ void PropertyFloatConstraint::Restore(Base::XMLReader& reader) // read my Element reader.readElement("Float"); // get the value of my Attribute - setValue(reader.getAttributeAsFloat("value")); + setValue(reader.getAttribute("value")); bool createConstraint = false; double minimum = std::numeric_limits::lowest(); double maximum = std::numeric_limits::max(); double stepsize = 1.0; if (reader.hasAttribute("min")) { - minimum = reader.getAttributeAsFloat("min"); + minimum = reader.getAttribute("min"); createConstraint = true; } if (reader.hasAttribute("max")) { - maximum = reader.getAttributeAsFloat("max"); + maximum = reader.getAttribute("max"); createConstraint = true; } if (reader.hasAttribute("step")) { - stepsize = reader.getAttributeAsFloat("step"); + stepsize = reader.getAttribute("step"); } if (createConstraint) {