Part: replace PyObject_IsTrue with Base::asBoolean
This commit is contained in:
@@ -59,8 +59,8 @@ int RectangularTrimmedSurfacePy::PyInit(PyObject* args, PyObject* /*kwd*/)
|
||||
Handle(Geom_Surface)::DownCast(static_cast<GeometrySurfacePy*>(surf)->
|
||||
getGeomSurfacePtr()->handle()),
|
||||
u1, u2, v1, v2,
|
||||
PyObject_IsTrue(usense) ? Standard_True : Standard_False,
|
||||
PyObject_IsTrue(vsense) ? Standard_True : Standard_False
|
||||
Base::asBoolean(usense),
|
||||
Base::asBoolean(vsense)
|
||||
));
|
||||
return 0;
|
||||
}
|
||||
@@ -70,8 +70,8 @@ int RectangularTrimmedSurfacePy::PyInit(PyObject* args, PyObject* /*kwd*/)
|
||||
PyObject *utrim=Py_False, *sense=Py_True;
|
||||
if (PyArg_ParseTuple(args, "O!ddO!|O!",&(Part::GeometrySurfacePy::Type),&surf,
|
||||
¶m1,¶m2,&PyBool_Type,&utrim,&PyBool_Type,&sense)) {
|
||||
Standard_Boolean UTrim = PyObject_IsTrue(utrim) ? Standard_True : Standard_False;
|
||||
Standard_Boolean Sense = PyObject_IsTrue(sense) ? Standard_True : Standard_False;
|
||||
Standard_Boolean UTrim = Base::asBoolean(utrim);
|
||||
Standard_Boolean Sense = Base::asBoolean(sense);
|
||||
getGeomTrimmedSurfacePtr()->setHandle(new Geom_RectangularTrimmedSurface(
|
||||
Handle(Geom_Surface)::DownCast(static_cast<GeometrySurfacePy*>(surf)->
|
||||
getGeomSurfacePtr()->handle()),
|
||||
|
||||
Reference in New Issue
Block a user