Sketcher: modernize C++: replace 'typedef' with 'using'
This commit is contained in:
@@ -41,8 +41,8 @@ struct ConstraintIds {
|
||||
|
||||
struct Constraint_Equal
|
||||
{
|
||||
typedef ConstraintIds argument_type;
|
||||
typedef bool result_type;
|
||||
using argument_type = ConstraintIds;
|
||||
using result_type = bool;
|
||||
struct Sketcher::ConstraintIds c;
|
||||
explicit Constraint_Equal(const ConstraintIds& c) : c(c)
|
||||
{
|
||||
|
||||
@@ -138,7 +138,7 @@ public:
|
||||
|
||||
bool getPyPathValue(const App::ObjectIdentifier &path, Py::Object &res) const override;
|
||||
|
||||
typedef std::pair<int, const Constraint*> ConstraintInfo ;
|
||||
using ConstraintInfo = std::pair<int, const Constraint*> ;
|
||||
|
||||
boost::signals2::signal<void (const std::map<App::ObjectIdentifier, App::ObjectIdentifier> &)> signalConstraintsRenamed;
|
||||
boost::signals2::signal<void (const std::set<App::ObjectIdentifier> &)> signalConstraintsRemoved;
|
||||
|
||||
@@ -725,7 +725,7 @@ const GeometryT * SketchObject::getGeometry(int GeoId) const
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
typedef App::FeaturePythonT<SketchObject> SketchObjectPython;
|
||||
using SketchObjectPython = App::FeaturePythonT<SketchObject>;
|
||||
|
||||
} //namespace Sketcher
|
||||
|
||||
|
||||
@@ -101,12 +101,12 @@
|
||||
#include <boost_graph_adjacency_list.hpp>
|
||||
#include <boost/graph/connected_components.hpp>
|
||||
|
||||
typedef Eigen::FullPivHouseholderQR<Eigen::MatrixXd>::IntDiagSizeVectorType MatrixIndexType;
|
||||
using MatrixIndexType = Eigen::FullPivHouseholderQR<Eigen::MatrixXd>::IntDiagSizeVectorType;
|
||||
|
||||
#ifndef EIGEN_STOCK_FULLPIVLU_COMPUTE
|
||||
namespace Eigen {
|
||||
|
||||
typedef Matrix<double,-1,-1,0,-1,-1> MatrixdType;
|
||||
using MatrixdType = Matrix<double,-1,-1,0,-1,-1>;
|
||||
|
||||
template<>
|
||||
FullPivLU<MatrixdType>& FullPivLU<MatrixdType>::compute(const MatrixdType& matrix)
|
||||
@@ -429,7 +429,7 @@ void SolverReportingManager::LogMatrix(const std::string str, MatrixIndexType ma
|
||||
#endif
|
||||
|
||||
|
||||
typedef boost::adjacency_list <boost::vecS, boost::vecS, boost::undirectedS> Graph;
|
||||
using Graph = boost::adjacency_list <boost::vecS, boost::vecS, boost::undirectedS>;
|
||||
|
||||
///////////////////////////////////////
|
||||
// Solver
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace GCS
|
||||
double *y;
|
||||
};
|
||||
|
||||
typedef std::vector<Point> VEC_P;
|
||||
using VEC_P = std::vector<Point>;
|
||||
|
||||
///Class DeriVector2 holds a vector value and its derivative on the
|
||||
///parameter that the derivatives are being calculated for now. x,y is the
|
||||
|
||||
@@ -29,14 +29,14 @@
|
||||
|
||||
namespace GCS
|
||||
{
|
||||
typedef std::vector<double *> VEC_pD;
|
||||
typedef std::vector<double> VEC_D;
|
||||
typedef std::vector<int> VEC_I;
|
||||
typedef std::map<double *, double *> MAP_pD_pD;
|
||||
typedef std::map<double *, double> MAP_pD_D;
|
||||
typedef std::map<double *, int> MAP_pD_I;
|
||||
typedef std::set<double *> SET_pD;
|
||||
typedef std::set<int> SET_I;
|
||||
using VEC_pD = std::vector<double *>;
|
||||
using VEC_D = std::vector<double>;
|
||||
using VEC_I = std::vector<int>;
|
||||
using MAP_pD_pD = std::map<double *, double *>;
|
||||
using MAP_pD_D = std::map<double *, double>;
|
||||
using MAP_pD_I = std::map<double *, int>;
|
||||
using SET_pD = std::set<double *>;
|
||||
using SET_I = std::set<int>;
|
||||
|
||||
#ifndef M_PI
|
||||
#define M_PI 3.14159265358979323846
|
||||
|
||||
@@ -872,7 +872,7 @@ void CmdSketcherSymmetry::activated(int iMsg)
|
||||
int LastGeoId = 0;
|
||||
Sketcher::PointPos LastPointPos = Sketcher::PointPos::none;
|
||||
const Part::Geometry *LastGeo;
|
||||
typedef enum { invalid = -1, line = 0, point = 1 } GeoType;
|
||||
using GeoType = enum { invalid = -1, line = 0, point = 1 };
|
||||
|
||||
GeoType lastgeotype = invalid;
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
namespace SketcherGui {
|
||||
|
||||
class SketcherGuiExport SoDatumLabel : public SoShape {
|
||||
typedef SoShape inherited;
|
||||
using inherited = SoShape;
|
||||
|
||||
SO_NODE_HEADER(SoDatumLabel);
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
namespace SketcherGui {
|
||||
|
||||
class SketcherGuiExport SoZoomTranslation : public SoTranslation {
|
||||
typedef SoTranslation inherited;
|
||||
using inherited = SoTranslation;
|
||||
|
||||
SO_NODE_HEADER(SoZoomTranslation);
|
||||
|
||||
@@ -41,7 +41,7 @@ public:
|
||||
SoSFVec3f abPos;
|
||||
|
||||
protected:
|
||||
~SoZoomTranslation() override {};
|
||||
~SoZoomTranslation() override {}
|
||||
void doAction(SoAction * action) override;
|
||||
void getPrimitiveCount(SoGetPrimitiveCountAction * action) override;
|
||||
void getMatrix(SoGetMatrixAction * action) override;
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
#include "TaskSketcherSolverAdvanced.h"
|
||||
#include <boost_signals2.hpp>
|
||||
|
||||
typedef boost::signals2::connection Connection;
|
||||
using Connection = boost::signals2::connection;
|
||||
|
||||
namespace SketcherGui {
|
||||
|
||||
|
||||
@@ -127,7 +127,7 @@ public Q_SLOTS:
|
||||
protected:
|
||||
void changeEvent(QEvent *e) override;
|
||||
ViewProviderSketch *sketchView;
|
||||
typedef boost::signals2::connection Connection;
|
||||
using Connection = boost::signals2::connection;
|
||||
Connection connectionConstraintsChanged;
|
||||
|
||||
private:
|
||||
|
||||
@@ -132,7 +132,7 @@ protected:
|
||||
void changeEvent(QEvent *e) override;
|
||||
void leaveEvent ( QEvent * event ) override;
|
||||
ViewProviderSketch *sketchView;
|
||||
typedef boost::signals2::connection Connection;
|
||||
using Connection = boost::signals2::connection;
|
||||
Connection connectionElementsChanged;
|
||||
|
||||
private:
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
#include <boost_signals2.hpp>
|
||||
|
||||
class Ui_TaskSketcherMessages;
|
||||
typedef boost::signals2::connection Connection;
|
||||
using Connection = boost::signals2::connection;
|
||||
|
||||
namespace App {
|
||||
class Property;
|
||||
|
||||
@@ -45,8 +45,8 @@ protected:
|
||||
std::map<const App::Property*, Gui::ViewProvider*> propView;
|
||||
};
|
||||
|
||||
typedef Gui::ViewProviderPythonFeatureT<ViewProviderSketch> ViewProviderPython;
|
||||
typedef Gui::ViewProviderPythonFeatureT<ViewProviderCustom> ViewProviderCustomPython;
|
||||
using ViewProviderPython = Gui::ViewProviderPythonFeatureT<ViewProviderSketch>;
|
||||
using ViewProviderCustomPython = Gui::ViewProviderPythonFeatureT<ViewProviderCustom>;
|
||||
|
||||
} // namespace SketcherGui
|
||||
|
||||
|
||||
Reference in New Issue
Block a user