235 lines
9.0 KiB
Diff
235 lines
9.0 KiB
Diff
From b9bfa0ab6e5152f9f8de8d91f7818a3eb3020e85 Mon Sep 17 00:00:00 2001
|
|
From: Armin Stebich <home@mail.lordofbikes.de>
|
|
Date: Mon, 10 Jun 2019 23:06:24 +0200
|
|
Subject: [PATCH] fix for GCC 9 build issue, as reported in #1111 and #1117
|
|
|
|
---
|
|
librecad/src/actions/rs_actiondrawcircletan1_2p.cpp | 5 -----
|
|
librecad/src/actions/rs_actiondrawcircletan1_2p.h | 3 +++
|
|
librecad/src/actions/rs_actiondrawcircletan2.cpp | 4 ----
|
|
librecad/src/actions/rs_actiondrawcircletan2.h | 3 +++
|
|
librecad/src/actions/rs_actiondrawcircletan2_1p.cpp | 4 ----
|
|
librecad/src/actions/rs_actiondrawcircletan2_1p.h | 3 +++
|
|
librecad/src/actions/rs_actiondrawcircletan3.cpp | 4 ----
|
|
librecad/src/actions/rs_actiondrawcircletan3.h | 2 ++
|
|
librecad/src/actions/rs_actiondrawlinerelangle.cpp | 5 -----
|
|
librecad/src/actions/rs_actiondrawlinerelangle.h | 3 +++
|
|
librecad/src/actions/rs_actiondrawlinetangent1.cpp | 6 ------
|
|
librecad/src/actions/rs_actiondrawlinetangent1.h | 6 ++++++
|
|
librecad/src/actions/rs_actiondrawlinetangent2.cpp | 4 ----
|
|
librecad/src/actions/rs_actiondrawlinetangent2.h | 3 +++
|
|
14 files changed, 23 insertions(+), 32 deletions(-)
|
|
|
|
diff --git librecad/src/actions/rs_actiondrawcircletan1_2p.cpp librecad/src/actions/rs_actiondrawcircletan1_2p.cpp
|
|
index c14da00e..f305408a 100644
|
|
--- a/librecad/src/actions/rs_actiondrawcircletan1_2p.cpp
|
|
+++ b/librecad/src/actions/rs_actiondrawcircletan1_2p.cpp
|
|
@@ -36,11 +36,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
#include "rs_preview.h"
|
|
#include "rs_debug.h"
|
|
|
|
-namespace{
|
|
-//list of entity types supported by current action
|
|
-auto enTypeList={RS2::EntityLine, RS2::EntityArc, RS2::EntityCircle};
|
|
-}
|
|
-
|
|
struct RS_ActionDrawCircleTan1_2P::Points {
|
|
std::vector<RS_Vector> points;
|
|
RS_CircleData cData;
|
|
diff --git librecad/src/actions/rs_actiondrawcircletan1_2p.h librecad/src/actions/rs_actiondrawcircletan1_2p.h
|
|
index a6f40a6e..b5976c9f 100644
|
|
--- a/librecad/src/actions/rs_actiondrawcircletan1_2p.h
|
|
+++ b/librecad/src/actions/rs_actiondrawcircletan1_2p.h
|
|
@@ -79,6 +79,9 @@ protected:
|
|
private:
|
|
struct Points;
|
|
std::unique_ptr<Points> pPoints;
|
|
+
|
|
+ //list of entity types supported by current action
|
|
+ const std::initializer_list<RS2::EntityType> enTypeList {RS2::EntityLine, RS2::EntityArc, RS2::EntityCircle};
|
|
};
|
|
|
|
#endif
|
|
diff --git librecad/src/actions/rs_actiondrawcircletan2.cpp librecad/src/actions/rs_actiondrawcircletan2.cpp
|
|
index d0558f05..820e4226 100644
|
|
--- a/librecad/src/actions/rs_actiondrawcircletan2.cpp
|
|
+++ b/librecad/src/actions/rs_actiondrawcircletan2.cpp
|
|
@@ -33,10 +33,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
#include "rs_preview.h"
|
|
#include "rs_debug.h"
|
|
|
|
-namespace {
|
|
-auto enTypeList={RS2::EntityLine, RS2::EntityArc, RS2::EntityCircle};
|
|
-}
|
|
-
|
|
struct RS_ActionDrawCircleTan2::Points {
|
|
RS_CircleData cData;
|
|
RS_Vector coord;
|
|
diff --git librecad/src/actions/rs_actiondrawcircletan2.h librecad/src/actions/rs_actiondrawcircletan2.h
|
|
index bed56897..5b2040e9 100644
|
|
--- a/librecad/src/actions/rs_actiondrawcircletan2.h
|
|
+++ b/librecad/src/actions/rs_actiondrawcircletan2.h
|
|
@@ -77,6 +77,9 @@ protected:
|
|
private:
|
|
struct Points;
|
|
std::unique_ptr<Points> pPoints;
|
|
+
|
|
+ //list of entity types supported by current action
|
|
+ const std::initializer_list<RS2::EntityType> enTypeList {RS2::EntityLine, RS2::EntityArc, RS2::EntityCircle};
|
|
};
|
|
|
|
#endif
|
|
diff --git librecad/src/actions/rs_actiondrawcircletan2_1p.cpp librecad/src/actions/rs_actiondrawcircletan2_1p.cpp
|
|
index 324c1668..51cd29a1 100644
|
|
--- a/librecad/src/actions/rs_actiondrawcircletan2_1p.cpp
|
|
+++ b/librecad/src/actions/rs_actiondrawcircletan2_1p.cpp
|
|
@@ -35,10 +35,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
#include "rs_preview.h"
|
|
#include "rs_debug.h"
|
|
|
|
-namespace {
|
|
-auto enTypeList={RS2::EntityLine, RS2::EntityArc, RS2::EntityCircle};
|
|
-}
|
|
-
|
|
struct RS_ActionDrawCircleTan2_1P::Points {
|
|
RS_Vector point;
|
|
RS_CircleData cData;
|
|
diff --git librecad/src/actions/rs_actiondrawcircletan2_1p.h librecad/src/actions/rs_actiondrawcircletan2_1p.h
|
|
index 40c23903..e44a56c3 100644
|
|
--- a/librecad/src/actions/rs_actiondrawcircletan2_1p.h
|
|
+++ b/librecad/src/actions/rs_actiondrawcircletan2_1p.h
|
|
@@ -73,6 +73,9 @@ protected:
|
|
private:
|
|
struct Points;
|
|
std::unique_ptr<Points> pPoints;
|
|
+
|
|
+ //list of entity types supported by current action
|
|
+ const std::initializer_list<RS2::EntityType> enTypeList {RS2::EntityLine, RS2::EntityArc, RS2::EntityCircle};
|
|
};
|
|
|
|
#endif
|
|
diff --git librecad/src/actions/rs_actiondrawcircletan3.cpp librecad/src/actions/rs_actiondrawcircletan3.cpp
|
|
index 026ed30e..eaca13d6 100644
|
|
--- a/librecad/src/actions/rs_actiondrawcircletan3.cpp
|
|
+++ b/librecad/src/actions/rs_actiondrawcircletan3.cpp
|
|
@@ -35,10 +35,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
#include "rs_preview.h"
|
|
#include "rs_debug.h"
|
|
|
|
-namespace {
|
|
-auto enTypeList={RS2::EntityArc, RS2::EntityCircle, RS2::EntityLine, RS2::EntityPoint};
|
|
-}
|
|
-
|
|
struct RS_ActionDrawCircleTan3::Points {
|
|
std::vector<RS_AtomicEntity*> circles;
|
|
std::shared_ptr<RS_CircleData> cData{std::make_shared<RS_CircleData>()};
|
|
diff --git librecad/src/actions/rs_actiondrawcircletan3.h librecad/src/actions/rs_actiondrawcircletan3.h
|
|
index d0cabfa2..3201c5f8 100644
|
|
--- a/librecad/src/actions/rs_actiondrawcircletan3.h
|
|
+++ b/librecad/src/actions/rs_actiondrawcircletan3.h
|
|
@@ -78,6 +78,8 @@ public:
|
|
struct Points;
|
|
std::unique_ptr<Points> pPoints;
|
|
|
|
+ //list of entity types supported by current action
|
|
+ const std::initializer_list<RS2::EntityType> enTypeList {RS2::EntityArc, RS2::EntityCircle, RS2::EntityLine, RS2::EntityPoint};
|
|
};
|
|
|
|
#endif
|
|
diff --git librecad/src/actions/rs_actiondrawlinerelangle.cpp librecad/src/actions/rs_actiondrawlinerelangle.cpp
|
|
index 8415dd60..b9ce996f 100644
|
|
--- a/librecad/src/actions/rs_actiondrawlinerelangle.cpp
|
|
+++ b/librecad/src/actions/rs_actiondrawlinerelangle.cpp
|
|
@@ -38,11 +38,6 @@
|
|
#include "rs_preview.h"
|
|
#include "rs_debug.h"
|
|
|
|
-namespace {
|
|
-auto enTypeList={RS2::EntityLine, RS2::EntityArc, RS2::EntityCircle,
|
|
- RS2::EntityEllipse};
|
|
-}
|
|
-
|
|
RS_ActionDrawLineRelAngle::RS_ActionDrawLineRelAngle(
|
|
RS_EntityContainer& container,
|
|
RS_GraphicView& graphicView,
|
|
diff --git librecad/src/actions/rs_actiondrawlinerelangle.h librecad/src/actions/rs_actiondrawlinerelangle.h
|
|
index 1e102792..71e5185b 100644
|
|
--- a/librecad/src/actions/rs_actiondrawlinerelangle.h
|
|
+++ b/librecad/src/actions/rs_actiondrawlinerelangle.h
|
|
@@ -110,6 +110,9 @@ private:
|
|
* Is the angle fixed?
|
|
*/
|
|
bool fixedAngle;
|
|
+
|
|
+ //list of entity types supported by current action
|
|
+ const std::initializer_list<RS2::EntityType> enTypeList {RS2::EntityLine, RS2::EntityArc, RS2::EntityCircle,RS2::EntityEllipse};
|
|
};
|
|
|
|
#endif
|
|
diff --git librecad/src/actions/rs_actiondrawlinetangent1.cpp librecad/src/actions/rs_actiondrawlinetangent1.cpp
|
|
index 197b0cb6..47a93c76 100644
|
|
--- a/librecad/src/actions/rs_actiondrawlinetangent1.cpp
|
|
+++ b/librecad/src/actions/rs_actiondrawlinetangent1.cpp
|
|
@@ -36,12 +36,6 @@
|
|
#include "rs_preview.h"
|
|
#include "rs_debug.h"
|
|
|
|
-namespace{
|
|
-auto circleType={RS2::EntityArc, RS2::EntityCircle,
|
|
- RS2::EntityEllipse, RS2::EntitySplinePoints
|
|
- };
|
|
-}
|
|
-
|
|
RS_ActionDrawLineTangent1::RS_ActionDrawLineTangent1(
|
|
RS_EntityContainer& container,
|
|
RS_GraphicView& graphicView)
|
|
diff --git librecad/src/actions/rs_actiondrawlinetangent1.h librecad/src/actions/rs_actiondrawlinetangent1.h
|
|
index 0f76b368..d20d302d 100644
|
|
--- a/librecad/src/actions/rs_actiondrawlinetangent1.h
|
|
+++ b/librecad/src/actions/rs_actiondrawlinetangent1.h
|
|
@@ -66,6 +66,12 @@ private:
|
|
std::unique_ptr<RS_Vector> point;
|
|
/** Chosen entity */
|
|
RS_Entity* circle;
|
|
+
|
|
+ //list of entity types supported by current action
|
|
+ const std::initializer_list<RS2::EntityType> circleType { RS2::EntityArc,
|
|
+ RS2::EntityCircle,
|
|
+ RS2::EntityEllipse,
|
|
+ RS2::EntitySplinePoints };
|
|
};
|
|
|
|
#endif
|
|
diff --git librecad/src/actions/rs_actiondrawlinetangent2.cpp librecad/src/actions/rs_actiondrawlinetangent2.cpp
|
|
index fed3545e..0f1600e5 100644
|
|
--- a/librecad/src/actions/rs_actiondrawlinetangent2.cpp
|
|
+++ b/librecad/src/actions/rs_actiondrawlinetangent2.cpp
|
|
@@ -35,10 +35,6 @@
|
|
#include "rs_preview.h"
|
|
#include "rs_debug.h"
|
|
|
|
-namespace{
|
|
-auto circleType={RS2::EntityArc, RS2::EntityCircle, RS2::EntityEllipse};
|
|
-}
|
|
-
|
|
RS_ActionDrawLineTangent2::RS_ActionDrawLineTangent2(
|
|
RS_EntityContainer& container,
|
|
RS_GraphicView& graphicView)
|
|
diff --git librecad/src/actions/rs_actiondrawlinetangent2.h librecad/src/actions/rs_actiondrawlinetangent2.h
|
|
index b0d884cd..95d82465 100644
|
|
--- a/librecad/src/actions/rs_actiondrawlinetangent2.h
|
|
+++ b/librecad/src/actions/rs_actiondrawlinetangent2.h
|
|
@@ -68,6 +68,9 @@ private:
|
|
/** 2nd chosen entity */
|
|
RS_Entity* circle2;
|
|
bool valid;
|
|
+
|
|
+ //list of entity types supported by current action
|
|
+ const std::initializer_list<RS2::EntityType> circleType {RS2::EntityArc, RS2::EntityCircle, RS2::EntityEllipse};
|
|
};
|
|
|
|
#endif
|
|
--
|
|
2.24.0
|
|
|