diff --git a/src/Mod/Sketcher/App/GeoEnum.cpp b/src/Mod/Sketcher/App/GeoEnum.cpp index e385ecfb75..cb3cd4f83d 100644 --- a/src/Mod/Sketcher/App/GeoEnum.cpp +++ b/src/Mod/Sketcher/App/GeoEnum.cpp @@ -26,12 +26,6 @@ using namespace Sketcher; -const int GeoEnum::RtPnt; -const int GeoEnum::HAxis; -const int GeoEnum::VAxis; -const int GeoEnum::RefExt; -const int GeoEnum::GeoUndef; - bool GeoElementId::operator==(const GeoElementId& obj) const { return this->GeoId == obj.GeoId && this->Pos == obj.Pos; diff --git a/src/Mod/Sketcher/App/GeoEnum.h b/src/Mod/Sketcher/App/GeoEnum.h index b64d11c2d2..df594c3a62 100644 --- a/src/Mod/Sketcher/App/GeoEnum.h +++ b/src/Mod/Sketcher/App/GeoEnum.h @@ -61,13 +61,13 @@ namespace Sketcher * * For Geometry lists, refer to GeoListModel template. */ -struct SketcherExport GeoEnum +enum GeoEnum { - static const int RtPnt = -1; // GeoId of the Root Point - static const int HAxis = -1; // GeoId of the Horizontal Axis - static const int VAxis = -2; // GeoId of the Vertical Axis - static const int RefExt = -3; // Starting GeoID of external geometry ( negative geoIds starting at this index) - static const int GeoUndef = -2000; // GeoId of an undefined Geometry (uninitialised or unused GeoId) + RtPnt = -1, // GeoId of the Root Point + HAxis = -1, // GeoId of the Horizontal Axis + VAxis = -2, // GeoId of the Vertical Axis + RefExt = -3, // Starting GeoID of external geometry ( negative geoIds starting at this index) + GeoUndef = -2000, // GeoId of an undefined Geometry (uninitialised or unused GeoId) }; /*! @@ -96,7 +96,7 @@ enum class PointPos : int { * ordered containers. * */ -class SketcherExport GeoElementId +class GeoElementId { public: /** @brief default constructor initialises object to an undefined (invalid) element. @@ -130,13 +130,13 @@ public: }; // inline constexpr constructor -constexpr GeoElementId::GeoElementId(int geoId, PointPos pos): GeoId(geoId), Pos(pos) +inline constexpr GeoElementId::GeoElementId(int geoId, PointPos pos): GeoId(geoId), Pos(pos) { } -constexpr const GeoElementId GeoElementId::RtPnt = GeoElementId(GeoEnum::RtPnt, PointPos::start); -constexpr const GeoElementId GeoElementId::HAxis = GeoElementId(GeoEnum::HAxis, PointPos::none); -constexpr const GeoElementId GeoElementId::VAxis = GeoElementId(GeoEnum::VAxis, PointPos::end); +inline constexpr const GeoElementId GeoElementId::RtPnt = GeoElementId(GeoEnum::RtPnt, PointPos::start); +inline constexpr const GeoElementId GeoElementId::HAxis = GeoElementId(GeoEnum::HAxis, PointPos::none); +inline constexpr const GeoElementId GeoElementId::VAxis = GeoElementId(GeoEnum::VAxis, PointPos::end); } // namespace Sketcher diff --git a/src/Mod/Sketcher/App/GeoList.cpp b/src/Mod/Sketcher/App/GeoList.cpp index 01a97c7ef6..289221427c 100644 --- a/src/Mod/Sketcher/App/GeoList.cpp +++ b/src/Mod/Sketcher/App/GeoList.cpp @@ -342,7 +342,7 @@ GeoListModel::GeoListModel( } } -template <> +template <> SketcherExport GeoListModel>::~GeoListModel() { // GeometryFacade is responsible for taken ownership of its pointers and deleting them. @@ -351,8 +351,8 @@ GeoListModel>::~GeoListModel() // instantiate the types so that other translation units can access template constructors -template class GeoListModel; -template class GeoListModel>; +template class SketcherExport GeoListModel; +template class SketcherExport GeoListModel>; } // namespace Sketcher diff --git a/src/Mod/Sketcher/Gui/PreCompiled.h b/src/Mod/Sketcher/Gui/PreCompiled.h index 4521f5ce15..67b1a137f1 100644 --- a/src/Mod/Sketcher/Gui/PreCompiled.h +++ b/src/Mod/Sketcher/Gui/PreCompiled.h @@ -105,6 +105,7 @@ # include #endif +#include #include #include #include