App: modernize C++11

* use nullptr
This commit is contained in:
wmayer
2022-03-23 17:29:23 +01:00
parent 4183c45a01
commit 1a20b7f119
67 changed files with 647 additions and 643 deletions

View File

@@ -33,51 +33,51 @@ PyTypeObject FeaturePythonPyT<FeaturePyT>::Type = {
0, /*tp_itemsize*/
/* methods */
FeaturePyT::PyDestructor, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
0, /*tp_compare*/
0, /*tp_repr*/
0, /*tp_as_number*/
0, /*tp_as_sequence*/
0, /*tp_as_mapping*/
0, /*tp_hash*/
0, /*tp_call */
0, /*tp_str */
nullptr, /*tp_print*/
nullptr, /*tp_getattr*/
nullptr, /*tp_setattr*/
nullptr, /*tp_compare*/
nullptr, /*tp_repr*/
nullptr, /*tp_as_number*/
nullptr, /*tp_as_sequence*/
nullptr, /*tp_as_mapping*/
nullptr, /*tp_hash*/
nullptr, /*tp_call */
nullptr, /*tp_str */
FeaturePyT::__getattro, /*tp_getattro*/
__setattro, /*tp_setattro*/
/* --- Functions to access object as input/output buffer ---------*/
0, /* tp_as_buffer */
nullptr, /* tp_as_buffer */
/* --- Flags to define presence of optional/expanded features */
Py_TPFLAGS_BASETYPE|Py_TPFLAGS_DEFAULT, /*tp_flags */
"This is the father of all Feature classes", /*tp_doc */
0, /*tp_traverse */
0, /*tp_clear */
0, /*tp_richcompare */
nullptr, /*tp_traverse */
nullptr, /*tp_clear */
nullptr, /*tp_richcompare */
0, /*tp_weaklistoffset */
0, /*tp_iter */
0, /*tp_iternext */
0, /*tp_methods */
0, /*tp_members */
0, /*tp_getset */
nullptr, /*tp_iter */
nullptr, /*tp_iternext */
nullptr, /*tp_methods */
nullptr, /*tp_members */
nullptr, /*tp_getset */
&FeaturePyT::Type, /*tp_base */
0, /*tp_dict */
0, /*tp_descr_get */
0, /*tp_descr_set */
nullptr, /*tp_dict */
nullptr, /*tp_descr_get */
nullptr, /*tp_descr_set */
0, /*tp_dictoffset */
FeaturePyT::__PyInit, /*tp_init */
0, /*tp_alloc */
0, /*tp_new */
0, /*tp_free Low-level free-memory routine */
0, /*tp_is_gc For PyObject_IS_GC */
0, /*tp_bases */
0, /*tp_mro method resolution order */
0, /*tp_cache */
0, /*tp_subclasses */
0, /*tp_weaklist */
0, /*tp_del */
nullptr, /*tp_alloc */
nullptr, /*tp_new */
nullptr, /*tp_free Low-level free-memory routine */
nullptr, /*tp_is_gc For PyObject_IS_GC */
nullptr, /*tp_bases */
nullptr, /*tp_mro method resolution order */
nullptr, /*tp_cache */
nullptr, /*tp_subclasses */
nullptr, /*tp_weaklist */
nullptr, /*tp_del */
0 /*tp_version_tag */
,0 /*tp_finalize */
,nullptr /*tp_finalize */
#if PY_VERSION_HEX >= 0x03080000
,0 /*tp_vectorcall */
#endif
@@ -164,9 +164,9 @@ PyObject *FeaturePythonPyT<FeaturePyT>::_getattr(const char *attr)
// Return the default dict
PyTypeObject *tp = this->ob_type;
// register type if needed
if (tp->tp_dict == NULL) {
if (tp->tp_dict == nullptr) {
if (PyType_Ready(tp) < 0)
return 0;
return nullptr;
}
PyObject* dict = FeaturePyT::_getattr(attr);
@@ -180,7 +180,7 @@ PyObject *FeaturePythonPyT<FeaturePyT>::_getattr(const char *attr)
}
// find the attribute in the dict
PyObject *dict_item = NULL;
PyObject *dict_item = nullptr;
dict_item = PyDict_GetItemString(dict_methods, attr);
if (dict_item) {
Py_INCREF(dict_item);