modernize C++: use using

This commit is contained in:
wmayer
2023-08-06 19:09:49 +02:00
committed by wwmayer
parent 630554f251
commit dbad96d43e
8 changed files with 41 additions and 16 deletions

View File

@@ -24,10 +24,20 @@
#ifndef APP_DOCUMENTOBSERVERPYTHON_H
#define APP_DOCUMENTOBSERVERPYTHON_H
#include <FCGlobal.h>
#include <boost/signals2.hpp>
#include <CXX/Objects.hxx>
#include <string>
#include <vector>
namespace App
{
class Document;
class DocumentObject;
class ExtensionContainer;
class Property;
/**
* The DocumentObserverPython class is used to notify registered Python instances
* whenever something happens to a document, like creation, destruction, adding or
@@ -111,13 +121,13 @@ private:
Py::Object inst;
static std::vector<DocumentObserverPython*> _instances;
typedef struct PythonObject {
using Connection = struct PythonObject {
boost::signals2::scoped_connection slot;
Py::Object py;
PyObject* ptr() {
return py.ptr();
}
} Connection;
};
Connection pyCreatedDocument;
Connection pyDeletedDocument;