Mod: Single arg ctors must be explicit
This commit is contained in:
@@ -913,7 +913,7 @@ struct WireJoiner {
|
||||
size_t iStart;
|
||||
size_t iEnd;
|
||||
size_t iCurrent;
|
||||
StackInfo(size_t idx) :iStart(idx), iEnd(idx), iCurrent(idx) {}
|
||||
explicit StackInfo(size_t idx) :iStart(idx), iEnd(idx), iCurrent(idx) {}
|
||||
};
|
||||
std::vector<StackInfo> stack;
|
||||
std::vector<VertexInfo> vertexStack;
|
||||
|
||||
@@ -95,7 +95,7 @@ struct PathExport CAreaConfig {
|
||||
* arc unfiting and fitting is lossy. And repeatedly perform these operation
|
||||
* may cause shape deformation. So it is best to delay arc fitting until the
|
||||
* final step*/
|
||||
CAreaConfig(const CAreaParams& p, bool noFitArcs = true);
|
||||
explicit CAreaConfig(const CAreaParams& p, bool noFitArcs = true);
|
||||
|
||||
/** The destructor restores the setting, and thus exception safe. */
|
||||
~CAreaConfig();
|
||||
@@ -171,7 +171,7 @@ public:
|
||||
/** Declare all parameters defined in #AREA_PARAMS_ALL as member variable */
|
||||
PARAM_ENUM_DECLARE(AREA_PARAMS_ALL)
|
||||
|
||||
Area(const AreaParams* params = nullptr);
|
||||
explicit Area(const AreaParams* params = nullptr);
|
||||
Area(const Area& other, bool deep_copy = true);
|
||||
~Area() override;
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ class DlgProcessorChooser : public QDialog
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
DlgProcessorChooser(std::vector<std::string> &scriptnames, bool withArguments = false);
|
||||
explicit DlgProcessorChooser(std::vector<std::string> &scriptnames, bool withArguments = false);
|
||||
~DlgProcessorChooser() override;
|
||||
|
||||
std::string getProcessor();
|
||||
|
||||
@@ -35,7 +35,7 @@ class DlgSettingsPathColor : public Gui::Dialog::PreferencePage
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
DlgSettingsPathColor(QWidget* parent = nullptr);
|
||||
explicit DlgSettingsPathColor(QWidget* parent = nullptr);
|
||||
~DlgSettingsPathColor() override;
|
||||
|
||||
void saveSettings() override;
|
||||
|
||||
@@ -41,7 +41,7 @@ class TaskWidgetPathCompound : public Gui::TaskView::TaskBox
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
TaskWidgetPathCompound(ViewProviderPathCompound *CompoundView, QWidget *parent=nullptr);
|
||||
explicit TaskWidgetPathCompound(ViewProviderPathCompound *CompoundView, QWidget *parent=nullptr);
|
||||
~TaskWidgetPathCompound() override;
|
||||
|
||||
std::vector<std::string> getList() const;
|
||||
|
||||
@@ -50,8 +50,8 @@ struct Point3D
|
||||
{
|
||||
Point3D() : x(0), y(0), z(0), sina(0), cosa(0) {}
|
||||
Point3D(float x, float y, float z) : x(x), y(y), z(z), sina(0), cosa(0) {}
|
||||
Point3D(Base::Vector3d & vec) : x(vec[0]), y(vec[1]), z(vec[2]), sina(0), cosa(0) {}
|
||||
Point3D(Base::Placement & pl) : x(pl.getPosition()[0]), y(pl.getPosition()[1]), z(pl.getPosition()[2]), sina(0), cosa(0) {}
|
||||
explicit Point3D(Base::Vector3d & vec) : x(vec[0]), y(vec[1]), z(vec[2]), sina(0), cosa(0) {}
|
||||
explicit Point3D(Base::Placement & pl) : x(pl.getPosition()[0]), y(pl.getPosition()[1]), z(pl.getPosition()[2]), sina(0), cosa(0) {}
|
||||
inline void set(float px, float py, float pz) { x = px; y = py; z = pz; }
|
||||
inline void Add(Point3D & p) { x += p.x; y += p.y; z += p.z; }
|
||||
inline void Rotate() { float tx = x; x = x * cosa - y * sina; y = tx * sina + y * cosa; }
|
||||
|
||||
Reference in New Issue
Block a user