From 09dccb70c7f88b115fc8394a79a63a44f6e7bb1e Mon Sep 17 00:00:00 2001 From: wmayer Date: Sat, 19 Nov 2022 15:57:54 +0100 Subject: [PATCH] Part: [skip ci] fix some warnings reported by GH actions --- src/Mod/Part/App/TopoShapePyImp.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Mod/Part/App/TopoShapePyImp.cpp b/src/Mod/Part/App/TopoShapePyImp.cpp index 1846159840..bb6330cbc9 100644 --- a/src/Mod/Part/App/TopoShapePyImp.cpp +++ b/src/Mod/Part/App/TopoShapePyImp.cpp @@ -1143,7 +1143,7 @@ PyObject* TopoShapePy::generalFuse(PyObject *args) TopoDS_Shape gfaResultShape = this->getTopoShapePtr()->generalFuse(shapeVec,tolerance,&map); Py::Object shapePy = shape2pyshape(gfaResultShape); Py::List mapPy; - for(TopTools_ListOfShape &shapes: map){ + for(TopTools_ListOfShape &shapes : map) { Py::List shapesPy; for(TopTools_ListIteratorOfListOfShape it(shapes); it.More(); it.Next()){ shapesPy.append(shape2pyshape(it.Value())); @@ -1247,7 +1247,7 @@ PyObject* TopoShapePy::childShapes(PyObject *args) namespace Part { // Containers to associate TopAbs_ShapeEnum values to each TopoShape*Py class -const std::vector> vecTypeShape = { +static const std::vector> vecTypeShape = { {&TopoShapeCompoundPy::Type, TopAbs_COMPOUND}, {&TopoShapeCompSolidPy::Type, TopAbs_COMPSOLID}, {&TopoShapeSolidPy::Type, TopAbs_SOLID}, @@ -1259,7 +1259,7 @@ const std::vector> vecTypeShape = { {&TopoShapePy::Type, TopAbs_SHAPE} }; -const std::map mapTypeShape( +static const std::map mapTypeShape( vecTypeShape.begin(), vecTypeShape.end()); // Returns shape type of a Python type. Similar to TopAbs::ShapeTypeFromString. @@ -1271,7 +1271,7 @@ static TopAbs_ShapeEnum ShapeTypeFromPyType(PyTypeObject* pyType) return it->second; } return TopAbs_SHAPE; -}; +} } PyObject* TopoShapePy::ancestorsOfType(PyObject *args) @@ -2500,7 +2500,7 @@ PyObject* TopoShapePy::proximity(PyObject *args) proximity.Perform(); if (!proximity.IsDone()) { - PyErr_SetString(PartExceptionOCCError, "BRepExtrema_ShapeProximity not done"); + PyErr_SetString(PartExceptionOCCError, "BRepExtrema_ShapeProximity failed, make sure the shapes are tessellated"); return nullptr; }