PD: modernize C++: replace 'typedef' with 'using'

This commit is contained in:
wmayer
2022-08-29 22:20:49 +02:00
parent ad7375380a
commit 3e009e2693
9 changed files with 16 additions and 16 deletions

View File

@@ -45,7 +45,7 @@ public:
Base::Vector3d getPoint();
typedef Part::Datum Superclass;
using Superclass = Part::Datum;
protected:
void onChanged(const App::Property* prop) override;

View File

@@ -36,7 +36,7 @@ class gp_Pln;
namespace PartDesign
{
typedef Part::TopoShape TopoShape;
using TopoShape = Part::TopoShape;
class Body;
@@ -96,7 +96,7 @@ protected:
static TopoDS_Shape makeShapeFromPlane(const App::DocumentObject* obj);
};
typedef App::FeaturePythonT<Feature> FeaturePython;
using FeaturePython = App::FeaturePythonT<Feature>;
} //namespace PartDesign

View File

@@ -57,7 +57,7 @@ protected:
TopoDS_Shape refineShapeIfActive(const TopoDS_Shape&) const;
};
typedef App::FeaturePythonT<FeatureAddSub> FeatureAddSubPython;
using FeatureAddSubPython = App::FeaturePythonT<FeatureAddSub>;
class FeatureAdditivePython : public FeatureAddSubPython
{

View File

@@ -342,9 +342,9 @@ TopoDS_Shape Transformed::refineShapeIfActive(const TopoDS_Shape& oldShape) cons
void Transformed::divideTools(const std::vector<TopoDS_Shape> &toolsIn, std::vector<TopoDS_Shape> &individualsOut,
TopoDS_Compound &compoundOut) const
{
typedef std::pair<TopoDS_Shape, Bnd_Box> ShapeBoundPair;
typedef std::list<ShapeBoundPair> PairList;
typedef std::vector<ShapeBoundPair> PairVector;
using ShapeBoundPair = std::pair<TopoDS_Shape, Bnd_Box>;
using PairList = std::list<ShapeBoundPair>;
using PairVector = std::vector<ShapeBoundPair>;
PairList pairList;

View File

@@ -71,14 +71,14 @@ private:
void slotChangedObject(const App::DocumentObject& Obj, const App::Property& Prop);
void onSettingDocument() override;
typedef boost::signals2::connection Connection;
using Connection = boost::signals2::connection;
Connection connectDocumentChangedObject;
};
class PartDesignExport SubShapeBinder : public Part::Feature {
PROPERTY_HEADER_WITH_OVERRIDE(PartDesign::SubShapeBinder);
public:
typedef Part::Feature inherited;
using inherited = Part::Feature;
SubShapeBinder();
~SubShapeBinder() override;
@@ -140,7 +140,7 @@ protected:
void slotRecomputedObject(const App::DocumentObject& Obj);
typedef boost::signals2::scoped_connection Connection;
using Connection = boost::signals2::scoped_connection;
Connection connRecomputedObj;
App::Document *contextDoc = nullptr;
@@ -151,7 +151,7 @@ protected:
std::vector<App::DocumentObjectT> _CopiedObjs;
};
typedef App::FeaturePythonT<SubShapeBinder> SubShapeBinderPython;
using SubShapeBinderPython = App::FeaturePythonT<SubShapeBinder>;
} //namespace PartDesign

View File

@@ -128,7 +128,7 @@ private:
private:
typedef boost::signals2::scoped_connection Connection;
using Connection = boost::signals2::scoped_connection;
Connection connectPropChanged;
std::unique_ptr<Observer> observer;

View File

@@ -27,7 +27,7 @@
#include <Gui/TaskView/TaskView.h>
class Ui_TaskTransformedMessages;
typedef boost::signals2::connection Connection;
using Connection = boost::signals2::connection;
namespace App {
class Property;

View File

@@ -39,7 +39,7 @@ class TaskDlgFeatureParameters;
*/
class PartDesignGuiExport ViewProvider : public PartGui::ViewProviderPart, PartGui::ViewProviderAttachExtension
{
typedef PartGui::ViewProviderPart inherited;
using inherited = PartGui::ViewProviderPart;
PROPERTY_HEADER_WITH_OVERRIDE(PartDesignGui::ViewProvider);
public:
@@ -90,7 +90,7 @@ protected:
bool isSetTipIcon;
};
typedef Gui::ViewProviderPythonFeatureT<ViewProvider> ViewProviderPython;
using ViewProviderPython = Gui::ViewProviderPythonFeatureT<ViewProvider>;
} // namespace PartDesignGui

View File

@@ -83,7 +83,7 @@ private:
void updatePlacement(bool transaction);
};
typedef Gui::ViewProviderPythonFeatureT<ViewProviderSubShapeBinder> ViewProviderSubShapeBinderPython;
using ViewProviderSubShapeBinderPython = Gui::ViewProviderPythonFeatureT<ViewProviderSubShapeBinder>;
} // namespace PartDesignGui