Gui: modernize C++11

* use nullptr
This commit is contained in:
wmayer
2022-03-23 18:41:21 +01:00
parent be7e18757c
commit 1178df06b4
239 changed files with 1197 additions and 1197 deletions

View File

@@ -46,7 +46,7 @@ std::string SelectionObjectPy::representation(void) const
PyObject* SelectionObjectPy::remove(PyObject * args)
{
if (!PyArg_ParseTuple(args, ""))
return 0;
return nullptr;
Selection().rmvSelection(getSelectionObjectPtr()->getDocName(),
getSelectionObjectPtr()->getFeatName());
Py_Return;
@@ -56,11 +56,11 @@ PyObject* SelectionObjectPy::isObjectTypeOf(PyObject * args)
{
char* type;
if (!PyArg_ParseTuple(args, "s", &type))
return 0;
return nullptr;
Base::Type id = Base::Type::fromName(type);
if (id.isBad()) {
PyErr_SetString(PyExc_TypeError, "Not a valid type");
return 0;
return nullptr;
}
bool ok = getSelectionObjectPtr()->isObjectTypeOf(id);
@@ -125,7 +125,7 @@ Py::Tuple SelectionObjectPy::getSubObjects(void) const
std::vector<PyObject *> subObjs;
for(const auto &subname : getSelectionObjectPtr()->getSubNames()) {
PyObject *pyObj=0;
PyObject *pyObj=nullptr;
Base::Matrix4D mat;
obj->getSubObject(subname.c_str(),&pyObj,&mat);
if(pyObj)
@@ -159,7 +159,7 @@ Py::Tuple SelectionObjectPy::getPickedPoints(void) const
PyObject *SelectionObjectPy::getCustomAttributes(const char* /*attr*/) const
{
return 0;
return nullptr;
}
int SelectionObjectPy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/)