From 0525cee4ee1c1605eba800fcfab56aece24db32f Mon Sep 17 00:00:00 2001 From: Abdullah Tahiri Date: Mon, 13 Nov 2023 19:42:31 +0100 Subject: [PATCH] SketcherGui: DSH Default - return reference in ShapeConstraint helpers --- src/Mod/Sketcher/Gui/DrawSketchDefaultHandler.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Mod/Sketcher/Gui/DrawSketchDefaultHandler.h b/src/Mod/Sketcher/Gui/DrawSketchDefaultHandler.h index b6274f6a07..88e706d282 100644 --- a/src/Mod/Sketcher/Gui/DrawSketchDefaultHandler.h +++ b/src/Mod/Sketcher/Gui/DrawSketchDefaultHandler.h @@ -1024,7 +1024,7 @@ protected: * inherent part of it and the shape would not go without them. Lower priority constraints are * AutoConstraints and constraints mandated by the widget/on-screen parameters. * .*/ - void addToShapeConstraints(Sketcher::ConstraintType type, + auto addToShapeConstraints(Sketcher::ConstraintType type, int first, Sketcher::PointPos firstPos = Sketcher::PointPos::none, int second = -2000, @@ -1040,7 +1040,7 @@ protected: constr->SecondPos = secondPos; constr->Third = third; constr->ThirdPos = thirdPos; - ShapeConstraints.push_back(std::move(constr)); + return ShapeConstraints.emplace_back(std::move(constr)).get(); } /** @brief Function to add a line to the ShapeGeometry vector.*/