modernize C++: avoid bind

In many cases std::bind() is kept because the code is much simpler
This commit is contained in:
wmayer
2023-08-08 19:10:49 +02:00
committed by wwmayer
parent 292196a606
commit d150fa7164
80 changed files with 240 additions and 30 deletions

View File

@@ -58,6 +58,7 @@ void DocumentObserverPython::removeObserver(const Py::Object& obj)
DocumentObserverPython::DocumentObserverPython(const Py::Object& obj) : inst(obj)
{
//NOLINTBEGIN
#define FC_PY_ELEMENT_ARG1(_name1, _name2) do {\
FC_PY_GetCallable(obj.ptr(), "slot" #_name1, py##_name1.py);\
if (!py##_name1.py.isNone())\
@@ -85,6 +86,7 @@ DocumentObserverPython::DocumentObserverPython(const Py::Object& obj) : inst(obj
FC_PY_ELEMENT_ARG2(ChangedObject, ChangedObject)
FC_PY_ELEMENT_ARG1(InEdit, InEdit)
FC_PY_ELEMENT_ARG1(ResetEdit, ResetEdit)
//NOLINTEND
}
DocumentObserverPython::~DocumentObserverPython()