diff --git a/src/App/DocumentObserverPython.h b/src/App/DocumentObserverPython.h index 95aee29b98..ce57626ddf 100644 --- a/src/App/DocumentObserverPython.h +++ b/src/App/DocumentObserverPython.h @@ -24,10 +24,20 @@ #ifndef APP_DOCUMENTOBSERVERPYTHON_H #define APP_DOCUMENTOBSERVERPYTHON_H +#include +#include +#include +#include +#include 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 _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; diff --git a/src/App/ElementMap.h b/src/App/ElementMap.h index fb49da4cdc..a617e0c59c 100644 --- a/src/App/ElementMap.h +++ b/src/App/ElementMap.h @@ -43,7 +43,7 @@ namespace Data { class ElementMap; -typedef std::shared_ptr ElementMapPtr; +using ElementMapPtr = std::shared_ptr; /* This class provides for ComplexGeoData's ability to provide proper naming. * Specifically, ComplexGeoData uses this class for it's `_id` property. diff --git a/src/Base/Writer.cpp b/src/Base/Writer.cpp index f6a12bb15e..b1d592f787 100644 --- a/src/Base/Writer.cpp +++ b/src/Base/Writer.cpp @@ -45,8 +45,8 @@ using namespace zipios; // It does not check if the character is valid utf8 or not. struct cdata_filter { - typedef char char_type; - typedef boost::iostreams::output_filter_tag category; + using char_type = char; + using category = boost::iostreams::output_filter_tag; template inline bool put(Device& dev, char c) { diff --git a/src/Gui/DocumentObserverPython.h b/src/Gui/DocumentObserverPython.h index 15424c9838..6d7ea31a60 100644 --- a/src/Gui/DocumentObserverPython.h +++ b/src/Gui/DocumentObserverPython.h @@ -24,10 +24,23 @@ #ifndef GUI_DOCUMENTOBSERVERPYTHON_H #define GUI_DOCUMENTOBSERVERPYTHON_H +#include +#include +#include +#include +#include + +namespace App { +class Property; +} namespace Gui { +class Document; +class ViewProvider; +class ViewProviderDocumentObject; + /** * The DocumentObserverPython class is used to notify registered Python instances * whenever something happens to a document, like creation, destruction, adding or @@ -73,13 +86,13 @@ private: Py::Object inst; static std::vector _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; diff --git a/src/Gui/Quarter/SoQTQuarterAdaptor.h b/src/Gui/Quarter/SoQTQuarterAdaptor.h index d5e883fe80..f9f46a25ee 100644 --- a/src/Gui/Quarter/SoQTQuarterAdaptor.h +++ b/src/Gui/Quarter/SoQTQuarterAdaptor.h @@ -40,7 +40,7 @@ namespace Coin3D { namespace Quarter { class SoQTQuarterAdaptor; -typedef void SoQTQuarterAdaptorCB(void* data, SoQTQuarterAdaptor* viewer); +using SoQTQuarterAdaptorCB = void (void* data, SoQTQuarterAdaptor* viewer); class QUARTER_DLL_API SoQTQuarterAdaptor : public QuarterWidget { diff --git a/src/Gui/SoFCSelectionContext.h b/src/Gui/SoFCSelectionContext.h index 293fc77196..68ee2d2720 100644 --- a/src/Gui/SoFCSelectionContext.h +++ b/src/Gui/SoFCSelectionContext.h @@ -41,8 +41,10 @@ using SoFCSelectionContextBasePtr = std::shared_ptr; struct GuiExport SoFCSelectionContextBase { virtual ~SoFCSelectionContextBase() {} - typedef int MergeFunc(int status, SoFCSelectionContextBasePtr &output, - SoFCSelectionContextBasePtr input, SoFCSelectionRoot *node); + using MergeFunc = int (int status, + SoFCSelectionContextBasePtr &output, + SoFCSelectionContextBasePtr input, + SoFCSelectionRoot *node); }; struct SoFCSelectionContext; diff --git a/src/Gui/SoFCUnifiedSelection.cpp b/src/Gui/SoFCUnifiedSelection.cpp index 4238cc2d52..2bc0581b17 100644 --- a/src/Gui/SoFCUnifiedSelection.cpp +++ b/src/Gui/SoFCUnifiedSelection.cpp @@ -1030,11 +1030,11 @@ void SoFCSeparator::finish() // Thread local data for bounding box rendering // // The code is inspred by Coin SoLevelOfDetails.cpp. -typedef struct { +using SoFCBBoxRenderInfo = struct { SoGetBoundingBoxAction * bboxaction; SoCube *cube; SoColorPacker *packer; -} SoFCBBoxRenderInfo; +}; static void so_bbox_construct_data(void * closure) { diff --git a/src/Mod/PartDesign/App/FeatureHole.h b/src/Mod/PartDesign/App/FeatureHole.h index acf56a7e31..fa51e14ee0 100644 --- a/src/Mod/PartDesign/App/FeatureHole.h +++ b/src/Mod/PartDesign/App/FeatureHole.h @@ -86,22 +86,22 @@ public: //@} short mustExecute() const override; - typedef struct { + using ThreadDescription = struct { const char * designation; double diameter; double pitch; double CoreHole; - } ThreadDescription; + }; static const ThreadDescription threadDescription[][171]; static const double metricHoleDiameters[36][4]; - typedef struct { + using UTSClearanceDefinition = struct { std::string designation; double close; double normal; double loose; - } UTSClearanceDefinition; + }; static const UTSClearanceDefinition UTSHoleDiameters[22]; void Restore(Base::XMLReader & reader) override;