Part: modernize C++11
* use nullptr
This commit is contained in:
@@ -55,7 +55,7 @@ PyObject *HyperbolaPy::PyMake(struct _typeobject *, PyObject *, PyObject *) //
|
||||
// constructor method
|
||||
int HyperbolaPy::PyInit(PyObject* args, PyObject* kwds)
|
||||
{
|
||||
char* keywords_n[] = {NULL};
|
||||
char* keywords_n[] = {nullptr};
|
||||
if (PyArg_ParseTupleAndKeywords(args, kwds, "", keywords_n)) {
|
||||
Handle(Geom_Hyperbola) hyperbola = Handle(Geom_Hyperbola)::DownCast(getGeomHyperbolaPtr()->handle());
|
||||
hyperbola->SetMajorRadius(2.0);
|
||||
@@ -63,7 +63,7 @@ int HyperbolaPy::PyInit(PyObject* args, PyObject* kwds)
|
||||
return 0;
|
||||
}
|
||||
|
||||
char* keywords_e[] = {"Hyperbola",NULL};
|
||||
char* keywords_e[] = {"Hyperbola",nullptr};
|
||||
PyErr_Clear();
|
||||
PyObject *pHypr;
|
||||
if (PyArg_ParseTupleAndKeywords(args, kwds, "O!",keywords_e, &(HyperbolaPy::Type), &pHypr)) {
|
||||
@@ -76,7 +76,7 @@ int HyperbolaPy::PyInit(PyObject* args, PyObject* kwds)
|
||||
return 0;
|
||||
}
|
||||
|
||||
char* keywords_ssc[] = {"S1","S2","Center",NULL};
|
||||
char* keywords_ssc[] = {"S1","S2","Center",nullptr};
|
||||
PyErr_Clear();
|
||||
PyObject *pV1, *pV2, *pV3;
|
||||
if (PyArg_ParseTupleAndKeywords(args, kwds, "O!O!O!", keywords_ssc,
|
||||
@@ -99,7 +99,7 @@ int HyperbolaPy::PyInit(PyObject* args, PyObject* kwds)
|
||||
return 0;
|
||||
}
|
||||
|
||||
char* keywords_cmm[] = {"Center","MajorRadius","MinorRadius",NULL};
|
||||
char* keywords_cmm[] = {"Center","MajorRadius","MinorRadius",nullptr};
|
||||
PyErr_Clear();
|
||||
PyObject *pV;
|
||||
double major, minor;
|
||||
@@ -173,7 +173,7 @@ Py::Object HyperbolaPy::getFocus2(void) const
|
||||
|
||||
PyObject *HyperbolaPy::getCustomAttributes(const char* /*attr*/) const
|
||||
{
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
int HyperbolaPy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/)
|
||||
|
||||
Reference in New Issue
Block a user