Base: modernize C++: return braced init list

This commit is contained in:
wmayer
2023-08-17 13:14:46 +02:00
committed by wwmayer
parent 2636e164f3
commit 2bc90e6090
24 changed files with 117 additions and 120 deletions

View File

@@ -32,7 +32,7 @@ using namespace Base;
// returns a string which represent the object e.g. when printed in python
std::string BaseClassPy::representation() const
{
return std::string("<binding object>");
return {"<binding object>"};
}
@@ -62,7 +62,7 @@ PyObject* BaseClassPy::getAllDerivedFrom(PyObject *args)
Py::String BaseClassPy::getTypeId() const
{
return Py::String(std::string(getBaseClassPtr()->getTypeId().getName()));
return {std::string(getBaseClassPtr()->getTypeId().getName())};
}
Py::String BaseClassPy::getModule() const
@@ -75,7 +75,7 @@ Py::String BaseClassPy::getModule() const
else
module.clear();
return Py::String(module);
return {module};
}
PyObject *BaseClassPy::getCustomAttributes(const char* /*attr*/) const