+ Fix compiler warnings with OCC 6.6
This commit is contained in:
@@ -61,12 +61,12 @@ int ArcPy::PyInit(PyObject* args, PyObject* /*kwd*/)
|
||||
{
|
||||
PyObject* o;
|
||||
double u1, u2;
|
||||
int sense=1;
|
||||
if (PyArg_ParseTuple(args, "O!dd|i", &(Part::CirclePy::Type), &o, &u1, &u2, &sense)) {
|
||||
PyObject *sense=Py_True;
|
||||
if (PyArg_ParseTuple(args, "O!dd|O!", &(Part::CirclePy::Type), &o, &u1, &u2, &PyBool_Type, &sense)) {
|
||||
try {
|
||||
Handle_Geom_Circle circle = Handle_Geom_Circle::DownCast
|
||||
(static_cast<CirclePy*>(o)->getGeomCirclePtr()->handle());
|
||||
GC_MakeArcOfCircle arc(circle->Circ(), u1, u2, sense);
|
||||
GC_MakeArcOfCircle arc(circle->Circ(), u1, u2, PyObject_IsTrue(sense) ? Standard_True : Standard_False);
|
||||
if (!arc.IsDone()) {
|
||||
PyErr_SetString(PyExc_Exception, gce_ErrorStatusText(arc.Status()));
|
||||
return -1;
|
||||
@@ -108,11 +108,11 @@ int ArcPy::PyInit(PyObject* args, PyObject* /*kwd*/)
|
||||
}
|
||||
|
||||
PyErr_Clear();
|
||||
if (PyArg_ParseTuple(args, "O!dd|i", &(Part::EllipsePy::Type), &o, &u1, &u2, &sense)) {
|
||||
if (PyArg_ParseTuple(args, "O!dd|O!", &(Part::EllipsePy::Type), &o, &u1, &u2, &PyBool_Type, &sense)) {
|
||||
try {
|
||||
Handle_Geom_Ellipse ellipse = Handle_Geom_Ellipse::DownCast
|
||||
(static_cast<EllipsePy*>(o)->getGeomEllipsePtr()->handle());
|
||||
GC_MakeArcOfEllipse arc(ellipse->Elips(), u1, u2, sense);
|
||||
GC_MakeArcOfEllipse arc(ellipse->Elips(), u1, u2, PyObject_IsTrue(sense) ? Standard_True : Standard_False);
|
||||
if (!arc.IsDone()) {
|
||||
PyErr_SetString(PyExc_Exception, gce_ErrorStatusText(arc.Status()));
|
||||
return -1;
|
||||
|
||||
Reference in New Issue
Block a user