From 656890be380997d0f80c5e078dbbf48635f9866b Mon Sep 17 00:00:00 2001 From: wmayer Date: Mon, 29 Aug 2022 12:58:39 +0200 Subject: [PATCH] App: modernize C++: replace 'typedef' with 'using' --- src/App/Application.h | 4 ++-- src/App/Branding.h | 2 +- src/App/ComplexGeoData.h | 2 +- src/App/Document.cpp | 24 ++++++++++++------------ src/App/DocumentObjectGroup.h | 2 +- src/App/DocumentObserver.cpp | 4 ++-- src/App/DocumentObserver.h | 5 +++-- src/App/Expression.cpp | 2 +- src/App/Expression.h | 6 +++--- src/App/Extension.h | 4 ++-- src/App/ExtensionContainer.h | 2 +- src/App/ExtensionPython.h | 4 ++-- src/App/FeaturePython.h | 6 +++--- src/App/GeoFeatureGroupExtension.h | 4 ++-- src/App/GroupExtension.h | 4 ++-- src/App/Link.cpp | 2 +- src/App/Link.h | 24 ++++++++++++------------ src/App/LinkBaseExtensionPyImp.cpp | 4 ++-- src/App/MaterialObject.h | 2 +- src/App/MergeDocuments.cpp | 2 +- src/App/MergeDocuments.h | 2 +- src/App/ObjectIdentifier.h | 8 ++++---- src/App/OriginGroupExtension.h | 2 +- src/App/Part.h | 2 +- src/App/Placement.h | 2 +- src/App/Property.h | 10 +++++----- src/App/PropertyContainerPyImp.cpp | 2 +- src/App/PropertyExpressionEngine.h | 10 +++++----- src/App/PropertyGeo.h | 2 +- src/App/PropertyLinks.cpp | 4 ++-- src/App/PropertyLinks.h | 10 +++++----- src/App/PropertyStandard.h | 6 +++--- src/App/Transactions.h | 2 +- 33 files changed, 86 insertions(+), 85 deletions(-) diff --git a/src/App/Application.h b/src/App/Application.h index 0148a064d5..5542b5961e 100644 --- a/src/App/Application.h +++ b/src/App/Application.h @@ -33,8 +33,8 @@ #include // forward declarations -typedef struct _object PyObject; -typedef struct PyMethodDef PyMethodDef; +using PyObject = struct _object; +using PyMethodDef = struct PyMethodDef; namespace Base { diff --git a/src/App/Branding.h b/src/App/Branding.h index 8685fa0705..c0293f3270 100644 --- a/src/App/Branding.h +++ b/src/App/Branding.h @@ -38,7 +38,7 @@ namespace App { class Branding { public: - typedef QMap XmlConfig; + using XmlConfig = QMap; Branding(); bool readFile(const QString& fn); diff --git a/src/App/ComplexGeoData.h b/src/App/ComplexGeoData.h index 6ea8a3af1b..e6af43a569 100644 --- a/src/App/ComplexGeoData.h +++ b/src/App/ComplexGeoData.h @@ -39,7 +39,7 @@ namespace Base class Placement; class Rotation; template class BoundBox3; -typedef BoundBox3 BoundBox3d; +using BoundBox3d = BoundBox3; } namespace Data diff --git a/src/App/Document.cpp b/src/App/Document.cpp index fdfdf6cf1e..e793681cba 100644 --- a/src/App/Document.cpp +++ b/src/App/Document.cpp @@ -133,7 +133,7 @@ using namespace zipios; namespace fs = boost::filesystem; -// typedef boost::property VertexProperty; +// using VertexProperty = boost::property; using DependencyList = boost::adjacency_list < boost::vecS, // class OutEdgeListS : a Sequence or an AssociativeContainer boost::vecS, // class VertexListS : a Sequence or a RandomAccessContainer @@ -307,16 +307,16 @@ void Document::writeDependencyGraphViz(std::ostream &out) void Document::exportGraphviz(std::ostream& out) const { - /* Typedefs for a graph with graphviz attributes */ - typedef std::map GraphvizAttributes; - typedef boost::subgraph< adjacency_list, - property >, - property - > > > > > Graph; + /* Type defs for a graph with graphviz attributes */ + using GraphvizAttributes = std::map; + using Graph = boost::subgraph< adjacency_list, + property >, + property + > > > > >; /** * @brief The GraphCreator class @@ -774,7 +774,7 @@ void Document::exportGraphviz(std::ostream& out) const } - typedef std::unordered_multimap EdgeMap; + using EdgeMap = std::unordered_multimap; void removeEdges(EdgeMap & in_edges, EdgeMap & out_edges, diff --git a/src/App/DocumentObjectGroup.h b/src/App/DocumentObjectGroup.h index d40b027cd4..2e88e7e946 100644 --- a/src/App/DocumentObjectGroup.h +++ b/src/App/DocumentObjectGroup.h @@ -49,7 +49,7 @@ public: PyObject *getPyObject() override; }; -typedef App::FeaturePythonT DocumentObjectGroupPython; +using DocumentObjectGroupPython = App::FeaturePythonT; } //namespace App diff --git a/src/App/DocumentObserver.cpp b/src/App/DocumentObserver.cpp index eead2a0769..35930e84ca 100644 --- a/src/App/DocumentObserver.cpp +++ b/src/App/DocumentObserver.cpp @@ -561,7 +561,7 @@ public: } App::Document* _document; - typedef boost::signals2::scoped_connection Connection; + using Connection = boost::signals2::scoped_connection; Connection connectApplicationDeletedDocument; }; @@ -642,7 +642,7 @@ public: App::DocumentObject* object; bool indocument; - typedef boost::signals2::scoped_connection Connection; + using Connection = boost::signals2::scoped_connection; Connection connectApplicationDeletedDocument; Connection connectDocumentCreatedObject; Connection connectDocumentDeletedObject; diff --git a/src/App/DocumentObserver.h b/src/App/DocumentObserver.h index 62a7a9c9f3..e929257e58 100644 --- a/src/App/DocumentObserver.h +++ b/src/App/DocumentObserver.h @@ -28,6 +28,7 @@ #include #include #include +#include namespace App @@ -501,7 +502,7 @@ protected: private: App::Document* _document; - typedef boost::signals2::connection Connection; + using Connection = boost::signals2::connection; Connection connectApplicationCreatedDocument; Connection connectApplicationDeletedDocument; Connection connectApplicationActivateDocument; @@ -522,7 +523,7 @@ class AppExport DocumentObjectObserver : public DocumentObserver { public: - typedef std::set::const_iterator const_iterator; + using const_iterator = std::set::const_iterator; /// Constructor DocumentObjectObserver(); diff --git a/src/App/Expression.cpp b/src/App/Expression.cpp index e269e8c360..ef790dbc0f 100644 --- a/src/App/Expression.cpp +++ b/src/App/Expression.cpp @@ -378,7 +378,7 @@ static inline bool essentiallyInteger(double a, long &l) { // without holding Python global lock struct PyObjectWrapper { public: - typedef std::shared_ptr Pointer; + using Pointer = std::shared_ptr; explicit PyObjectWrapper(PyObject *obj):pyobj(obj) { Py::_XINCREF(pyobj); diff --git a/src/App/Expression.h b/src/App/Expression.h index 88bad3e2b8..c70d348278 100644 --- a/src/App/Expression.h +++ b/src/App/Expression.h @@ -45,13 +45,13 @@ class DocumentObject; class Expression; class Document; -typedef std::unique_ptr ExpressionPtr; +using ExpressionPtr = std::unique_ptr; AppExport bool isAnyEqual(const App::any &v1, const App::any &v2); AppExport Base::Quantity anyToQuantity(const App::any &value, const char *errmsg = nullptr); // Map of depending objects to a map of depending property name to the full referencing object identifier -typedef std::map > > ExpressionDeps; +using ExpressionDeps = std::map > >; class AppExport ExpressionVisitor { public: @@ -172,7 +172,7 @@ public: virtual void addComponent(Component* component); - typedef std::vector ComponentList; + using ComponentList = std::vector; static Component *createComponent(const std::string &n); static Component *createComponent(Expression *e1, Expression *e2=nullptr, diff --git a/src/App/Extension.h b/src/App/Extension.h index 329b43d5ab..ea6d8b4fe1 100644 --- a/src/App/Extension.h +++ b/src/App/Extension.h @@ -146,7 +146,7 @@ template<> void _class_::init(void){\ * EXTENSION_ADD_PROPERTY(MyProp, (0)) * * initExtension(MyExtension::getExtensionClassTypeId()); * } - * typedef ExtensionPythonT MyExtensionPython; + * using MyExtensionPython = ExtensionPythonT; * @endcode * * The special python extension type created above is important, as only those python extensions @@ -212,7 +212,7 @@ template<> void _class_::init(void){\ * To ensure that your wrapper is used when a extension is created from python the extension type must * be exposed as follows: * @code - * typedef ExtensionPythonT> MyExtensionPython; + * using MyExtensionPython = ExtensionPythonT>; * @endcode * * This boilerplate is absolutely necessary to allow overridable methods in python and it is the diff --git a/src/App/ExtensionContainer.h b/src/App/ExtensionContainer.h index 43132b5c89..a190932976 100644 --- a/src/App/ExtensionContainer.h +++ b/src/App/ExtensionContainer.h @@ -114,7 +114,7 @@ class AppExport ExtensionContainer : public App::PropertyContainer public: - typedef std::map::iterator ExtensionIterator; + using ExtensionIterator = std::map::iterator; ExtensionContainer(); ~ExtensionContainer() override; diff --git a/src/App/ExtensionPython.h b/src/App/ExtensionPython.h index 275eedb483..854c09fb51 100644 --- a/src/App/ExtensionPython.h +++ b/src/App/ExtensionPython.h @@ -40,7 +40,7 @@ class ExtensionPythonT : public ExtensionT EXTENSION_PROPERTY_HEADER(App::ExtensionPythonT); public: - typedef ExtensionT Inherited; + using Inherited = ExtensionT; ExtensionPythonT() { ExtensionT::m_isPythonExtension = true; @@ -54,7 +54,7 @@ public: ExtensionPythonT& operator= (ExtensionPythonT&&) = delete; }; -typedef ExtensionPythonT ExtensionPython; +using ExtensionPython = ExtensionPythonT; // Helper macros to define python extensions #define EXTENSION_PROXY_FIRST(function) \ diff --git a/src/App/FeaturePython.h b/src/App/FeaturePython.h index 9223a7bf28..44734e6868 100644 --- a/src/App/FeaturePython.h +++ b/src/App/FeaturePython.h @@ -150,7 +150,7 @@ private: FlagMax, }; - typedef std::bitset Flags; + using Flags = std::bitset; mutable Flags _Flags; public: @@ -355,8 +355,8 @@ private: }; // Special Feature-Python classes -typedef FeaturePythonT FeaturePython; -typedef FeaturePythonT GeometryPython; +using FeaturePython = FeaturePythonT; +using GeometryPython = FeaturePythonT; } //namespace App diff --git a/src/App/GeoFeatureGroupExtension.h b/src/App/GeoFeatureGroupExtension.h index 3069846a20..621145e1b5 100644 --- a/src/App/GeoFeatureGroupExtension.h +++ b/src/App/GeoFeatureGroupExtension.h @@ -50,7 +50,7 @@ namespace App */ class AppExport GeoFeatureGroupExtension : public App::GroupExtension { - typedef App::GroupExtension inherited; + using inherited = App::GroupExtension; EXTENSION_PROPERTY_HEADER_WITH_OVERRIDE(App::GeoFeatureGroupExtension); public: @@ -138,7 +138,7 @@ private: }; -typedef ExtensionPythonT> GeoFeatureGroupExtensionPython; +using GeoFeatureGroupExtensionPython = ExtensionPythonT>; } //namespace App diff --git a/src/App/GroupExtension.h b/src/App/GroupExtension.h index 05588df0b7..189a8ea93b 100644 --- a/src/App/GroupExtension.h +++ b/src/App/GroupExtension.h @@ -38,7 +38,7 @@ class GroupExtensionPy; class AppExport GroupExtension : public DocumentObjectExtension { EXTENSION_PROPERTY_HEADER_WITH_OVERRIDE(App::GroupExtension); - typedef DocumentObjectExtension inherited; + using inherited = DocumentObjectExtension; public: /// Constructor @@ -160,7 +160,7 @@ public: }; }; -typedef ExtensionPythonT> GroupExtensionPython; +using GroupExtensionPython = ExtensionPythonT>; } //namespace App diff --git a/src/App/Link.cpp b/src/App/Link.cpp index 8663439018..b638591f1c 100644 --- a/src/App/Link.cpp +++ b/src/App/Link.cpp @@ -49,7 +49,7 @@ using namespace App; using namespace Base; namespace bp = boost::placeholders; -typedef boost::iterator_range CharRange; +using CharRange = boost::iterator_range; //////////////////////////////////////////////////////////////////////// diff --git a/src/App/Link.h b/src/App/Link.h index 71b7d74d8b..faa1ecdb3a 100644 --- a/src/App/Link.h +++ b/src/App/Link.h @@ -51,7 +51,7 @@ namespace App class AppExport LinkBaseExtension : public App::DocumentObjectExtension { EXTENSION_PROPERTY_HEADER_WITH_OVERRIDE(App::LinkExtension); - typedef App::DocumentObjectExtension inherited; + using inherited = App::DocumentObjectExtension; public: LinkBaseExtension(); @@ -217,7 +217,7 @@ public: virtual const std::vector &getPropertyInfo() const; - typedef std::map PropInfoMap; + using PropInfoMap = std::map; virtual const PropInfoMap &getPropertyInfoMap() const; enum LinkCopyOnChangeType { @@ -313,7 +313,7 @@ public: DocumentObject *getTrueLinkedObject(bool recurse, Base::Matrix4D *mat=nullptr,int depth=0, bool noElement=false) const; - typedef std::map > LinkPropMap; + using LinkPropMap = std::map >; bool hasPlacement() const { return getLinkPlacementProperty() || getPlacementProperty(); @@ -398,14 +398,14 @@ protected: /////////////////////////////////////////////////////////////////////////// -typedef ExtensionPythonT LinkBaseExtensionPython; +using LinkBaseExtensionPython = ExtensionPythonT; /////////////////////////////////////////////////////////////////////////// class AppExport LinkExtension : public LinkBaseExtension { EXTENSION_PROPERTY_HEADER_WITH_OVERRIDE(App::LinkExtension); - typedef LinkBaseExtension inherited; + using inherited = LinkBaseExtension; public: LinkExtension(); @@ -509,14 +509,14 @@ public: /////////////////////////////////////////////////////////////////////////// -typedef ExtensionPythonT LinkExtensionPython; +using LinkExtensionPython = ExtensionPythonT; /////////////////////////////////////////////////////////////////////////// class AppExport Link : public App::DocumentObject, public App::LinkExtension { PROPERTY_HEADER_WITH_EXTENSIONS(App::Link); - typedef App::DocumentObject inherited; + using inherited = App::DocumentObject; public: #define LINK_PARAMS_LINK \ @@ -556,13 +556,13 @@ public: bool canLinkProperties() const override; }; -typedef App::FeaturePythonT LinkPython; +using LinkPython = App::FeaturePythonT; /////////////////////////////////////////////////////////////////////////// class AppExport LinkElement : public App::DocumentObject, public App::LinkBaseExtension { PROPERTY_HEADER_WITH_EXTENSIONS(App::LinkElement); - typedef App::DocumentObject inherited; + using inherited = App::DocumentObject; public: #define LINK_PARAMS_ELEMENT \ @@ -599,13 +599,13 @@ public: } }; -typedef App::FeaturePythonT LinkElementPython; +using LinkElementPython = App::FeaturePythonT; /////////////////////////////////////////////////////////////////////////// class AppExport LinkGroup : public App::DocumentObject, public App::LinkBaseExtension { PROPERTY_HEADER_WITH_EXTENSIONS(App::LinkGroup); - typedef App::DocumentObject inherited; + using inherited = App::DocumentObject; public: #define LINK_PARAMS_GROUP \ @@ -630,7 +630,7 @@ public: } }; -typedef App::FeaturePythonT LinkGroupPython; +using LinkGroupPython = App::FeaturePythonT; } //namespace App diff --git a/src/App/LinkBaseExtensionPyImp.cpp b/src/App/LinkBaseExtensionPyImp.cpp index f84ff7a7bb..77098254e6 100644 --- a/src/App/LinkBaseExtensionPyImp.cpp +++ b/src/App/LinkBaseExtensionPyImp.cpp @@ -40,8 +40,8 @@ std::string LinkBaseExtensionPy::representation() const return str.str(); } -typedef std::map > PropTmpMap; -typedef std::map PropMap; +using PropTmpMap = std::map >; +using PropMap = std::map; static bool getProperty(PropTmpMap &props, const LinkBaseExtension::PropInfoMap &infoMap, const PropMap &propMap, PyObject *key, PyObject *value) diff --git a/src/App/MaterialObject.h b/src/App/MaterialObject.h index 67f15a2e1a..8a1aafbf54 100644 --- a/src/App/MaterialObject.h +++ b/src/App/MaterialObject.h @@ -50,7 +50,7 @@ public: }; -typedef App::FeaturePythonT MaterialObjectPython; +using MaterialObjectPython = App::FeaturePythonT; } //namespace App diff --git a/src/App/MergeDocuments.cpp b/src/App/MergeDocuments.cpp index 81c365a2b3..177d8996e0 100644 --- a/src/App/MergeDocuments.cpp +++ b/src/App/MergeDocuments.cpp @@ -66,7 +66,7 @@ protected: private: std::map& nameMap; - typedef std::pair PropertyTag; + using PropertyTag = std::pair; std::stack propertyStack; }; } diff --git a/src/App/MergeDocuments.h b/src/App/MergeDocuments.h index 14e1ceca35..cdcae9308e 100644 --- a/src/App/MergeDocuments.h +++ b/src/App/MergeDocuments.h @@ -59,7 +59,7 @@ private: App::Document* appdoc; std::vector objects; std::map nameMap; - typedef boost::signals2::connection Connection; + using Connection = boost::signals2::connection; Connection connectExport; Connection connectImport; }; diff --git a/src/App/ObjectIdentifier.h b/src/App/ObjectIdentifier.h index 133728e909..2b3c2c5498 100644 --- a/src/App/ObjectIdentifier.h +++ b/src/App/ObjectIdentifier.h @@ -346,7 +346,7 @@ public: const std::string &getSubObjectName(bool newStyle) const; const std::string &getSubObjectName() const; - typedef std::map,std::string> SubNameMap; + using SubNameMap = std::map,std::string>; void importSubNames(const SubNameMap &subNameMap); bool updateLabelReference(App::DocumentObject *, const std::string &, const char *); @@ -363,7 +363,7 @@ public: * the property may not exist at the time this ObjectIdentifier is * constructed. */ - typedef std::map > Dependencies; + using Dependencies = std::map >; /** Get dependencies of this object identifier * @@ -516,8 +516,8 @@ namespace std { template<> struct hash { - typedef App::ObjectIdentifier argument_type; - typedef std::size_t result_type; + using argument_type = App::ObjectIdentifier; + using result_type = std::size_t; inline result_type operator()(argument_type const& s) const { return s.hash(); } diff --git a/src/App/OriginGroupExtension.h b/src/App/OriginGroupExtension.h index f5ea25ad43..6ec3ef9544 100644 --- a/src/App/OriginGroupExtension.h +++ b/src/App/OriginGroupExtension.h @@ -80,7 +80,7 @@ protected: void onExtendedUnsetupObject () override; }; -typedef ExtensionPythonT> OriginGroupExtensionPython; +using OriginGroupExtensionPython = ExtensionPythonT>; } /* App */ diff --git a/src/App/Part.h b/src/App/Part.h index f217bc67c5..a40212fd72 100644 --- a/src/App/Part.h +++ b/src/App/Part.h @@ -98,7 +98,7 @@ public: PyObject *getPyObject() override; }; -//typedef App::FeaturePythonT PartPython; +//using PartPython = App::FeaturePythonT; } //namespace App diff --git a/src/App/Placement.h b/src/App/Placement.h index 8d371515c6..39b18f9920 100644 --- a/src/App/Placement.h +++ b/src/App/Placement.h @@ -48,7 +48,7 @@ public: }; -typedef App::FeaturePythonT PlacementPython; +using PlacementPython = App::FeaturePythonT; } //namespace App diff --git a/src/App/Property.h b/src/App/Property.h index d10b7994e4..dd7d879eea 100644 --- a/src/App/Property.h +++ b/src/App/Property.h @@ -474,11 +474,11 @@ class PropertyListsT: public ParentT , public AtomicPropertyChangeInterface > { public: - typedef typename ListT::const_reference const_reference; - typedef ListT list_type; - typedef ParentT parent_type; - typedef typename AtomicPropertyChangeInterface< - PropertyListsT >::AtomicPropertyChange atomic_change; + using const_reference = typename ListT::const_reference; + using list_type = ListT; + using parent_type = ParentT; + using atomic_change = typename AtomicPropertyChangeInterface< + PropertyListsT >::AtomicPropertyChange; friend atomic_change; diff --git a/src/App/PropertyContainerPyImp.cpp b/src/App/PropertyContainerPyImp.cpp index 03e84a5d59..4aa2304d42 100644 --- a/src/App/PropertyContainerPyImp.cpp +++ b/src/App/PropertyContainerPyImp.cpp @@ -550,7 +550,7 @@ PyObject* PropertyContainerPy::restorePropertyContent(PyObject *args) //check if it really is a buffer try { - typedef boost::iostreams::basic_array_source Device; + using Device = boost::iostreams::basic_array_source; boost::iostreams::stream stream((char*)buf.buf, buf.len); prop->restoreFromStream(stream); } diff --git a/src/App/PropertyExpressionEngine.h b/src/App/PropertyExpressionEngine.h index 36ea7c189b..efb54a7479 100644 --- a/src/App/PropertyExpressionEngine.h +++ b/src/App/PropertyExpressionEngine.h @@ -77,7 +77,7 @@ public: Property *CopyOnLinkReplace(const App::DocumentObject *parent, App::DocumentObject *oldObj, App::DocumentObject *newObj) const override; - typedef std::function expr)> ValidatorFunc; + using ValidatorFunc = std::function expr)>; /** * @brief The ExpressionInfo struct encapsulates an expression. @@ -176,13 +176,13 @@ protected: private: - typedef boost::adjacency_list< boost::listS, boost::vecS, boost::directedS > DiGraph; - typedef std::pair Edge; + using DiGraph = boost::adjacency_list< boost::listS, boost::vecS, boost::directedS >; + using Edge = std::pair; // Note: use std::map instead of unordered_map to keep the binding order stable #if defined(FC_OS_MACOSX) || defined(FC_OS_BSD) - typedef std::map ExpressionMap; + using ExpressionMap = std::map; #else - typedef std::map ExpressionMap; + using ExpressionMap = std::map; #endif std::vector computeEvaluationOrder(ExecuteOption option); diff --git a/src/App/PropertyGeo.h b/src/App/PropertyGeo.h index a9268fdea4..62d1f1299c 100644 --- a/src/App/PropertyGeo.h +++ b/src/App/PropertyGeo.h @@ -199,7 +199,7 @@ class AppExport PropertyVectorList: public PropertyListsT { TYPESYSTEM_HEADER_WITH_OVERRIDE(); - typedef PropertyListsT inherited; + using inherited = PropertyListsT; public: /** diff --git a/src/App/PropertyLinks.cpp b/src/App/PropertyLinks.cpp index 1bc29a722e..c0ae427953 100644 --- a/src/App/PropertyLinks.cpp +++ b/src/App/PropertyLinks.cpp @@ -2519,14 +2519,14 @@ bool PropertyLinkSubList::adjustLink(const std::set &inLis // has now been changed to simply use the absoluteFilePath(), and rely on user // to be aware of possible duplicated file location. The reason being that // some user (especially Linux user) use symlink to organize file tree. -typedef std::map DocInfoMap; +using DocInfoMap = std::map; DocInfoMap _DocInfoMap; class App::DocInfo : public std::enable_shared_from_this { public: - typedef boost::signals2::scoped_connection Connection; + using Connection = boost::signals2::scoped_connection; Connection connFinishRestoreDocument; Connection connPendingReloadDocument; Connection connDeleteDocument; diff --git a/src/App/PropertyLinks.h b/src/App/PropertyLinks.h index 133908f4d2..a305e94fda 100644 --- a/src/App/PropertyLinks.h +++ b/src/App/PropertyLinks.h @@ -40,7 +40,7 @@ class DocumentObject; class Document; class DocInfo; -typedef std::shared_ptr DocInfoPtr; +using DocInfoPtr = std::shared_ptr; class PropertyXLink; @@ -99,7 +99,7 @@ class AppExport PropertyLinkBase : public Property, public ScopedLink { TYPESYSTEM_HEADER_WITH_OVERRIDE(); public: - typedef std::pair ShadowSub; + using ShadowSub = std::pair; PropertyLinkBase(); ~PropertyLinkBase() override; @@ -674,7 +674,7 @@ class AppExport PropertyLinkList : public PropertyListsT, PropertyLinkListBase> { TYPESYSTEM_HEADER_WITH_OVERRIDE(); - typedef PropertyListsT,PropertyLinkListBase> inherited; + using inherited = PropertyListsT,PropertyLinkListBase>; public: /** @@ -899,7 +899,7 @@ class AppExport PropertyLinkSubList : public PropertyLinkBase TYPESYSTEM_HEADER_WITH_OVERRIDE(); public: - typedef std::pair > SubSet; + using SubSet = std::pair >; /** * A constructor. * A more elaborate description of the constructor. @@ -1198,7 +1198,7 @@ class AppExport PropertyXLinkSubList: public PropertyLinkBase { TYPESYSTEM_HEADER_WITH_OVERRIDE(); - typedef typename AtomicPropertyChangeInterface::AtomicPropertyChange atomic_change; + using atomic_change = typename AtomicPropertyChangeInterface::AtomicPropertyChange; friend atomic_change; public: diff --git a/src/App/PropertyStandard.h b/src/App/PropertyStandard.h index 4a6a9e7b76..cd5d8755f3 100644 --- a/src/App/PropertyStandard.h +++ b/src/App/PropertyStandard.h @@ -798,7 +798,7 @@ public: class AppExport PropertyStringList: public PropertyListsT { TYPESYSTEM_HEADER_WITH_OVERRIDE(); - typedef PropertyListsT inherited; + using inherited = PropertyListsT; public: @@ -891,7 +891,7 @@ private: class AppExport PropertyBoolList : public PropertyListsT > { TYPESYSTEM_HEADER_WITH_OVERRIDE(); - typedef PropertyListsT > inherited; + using inherited = PropertyListsT >; public: PropertyBoolList(); @@ -1105,7 +1105,7 @@ protected: */ class AppExport PropertyPersistentObject: public PropertyString { TYPESYSTEM_HEADER_WITH_OVERRIDE(); - typedef PropertyString inherited; + using inherited = PropertyString; public: PyObject *getPyObject() override; void setValue(const char* type) override; diff --git a/src/App/Transactions.h b/src/App/Transactions.h index 0d0165a55b..c0cb264135 100644 --- a/src/App/Transactions.h +++ b/src/App/Transactions.h @@ -89,7 +89,7 @@ public: private: int transID; - typedef std::pair Info; + using Info = std::pair; bmi::multi_index_container< Info, bmi::indexed_by<