[skip ci] fix more -Wgnu-zero-variadic-macro-arguments

This commit is contained in:
wmayer
2019-11-17 21:32:19 +01:00
parent cc6115920f
commit 9049fed49a
2 changed files with 41 additions and 34 deletions

View File

@@ -75,26 +75,24 @@ private:
Py::Object inst;
static std::vector<DocumentObserverPython*> _instances;
typedef boost::signals2::connection Connection;
typedef struct {
boost::signals2::scoped_connection slot;
Py::Object py;
PyObject* ptr() {
return py.ptr();
}
} Connection;
#define FC_PY_GDOC_OBSERVER \
FC_PY_ELEMENT(CreatedDocument,_1) \
FC_PY_ELEMENT(DeletedDocument,_1) \
FC_PY_ELEMENT(RelabelDocument,_1) \
FC_PY_ELEMENT(RenameDocument,_1) \
FC_PY_ELEMENT(ActivateDocument,_1) \
FC_PY_ELEMENT(CreatedObject,_1) \
FC_PY_ELEMENT(DeletedObject,_1) \
FC_PY_ELEMENT(ChangedObject,_1,_2) \
FC_PY_ELEMENT(InEdit,_1) \
FC_PY_ELEMENT(ResetEdit,_1)
#undef FC_PY_ELEMENT
#define FC_PY_ELEMENT(_name,...) \
Connection connect##_name;\
Py::Object py##_name;
FC_PY_GDOC_OBSERVER
Connection pyCreatedDocument;
Connection pyDeletedDocument;
Connection pyRelabelDocument;
Connection pyRenameDocument;
Connection pyActivateDocument;
Connection pyCreatedObject;
Connection pyDeletedObject;
Connection pyChangedObject;
Connection pyInEdit;
Connection pyResetEdit;
};
} //namespace Gui