Sketcher: GeoEnum and GeoListId constant reference outside the translation unit
================================================================================ GeoEnum static members are used in constexpr in GeoListId. Previous code worked because the static members where inside the same translation unit. This code: 1. Declares the static members to use them as constant expressions with the value 2. Definition of the static members (odr-used) shall not contain an initializer.
This commit is contained in:
committed by
abdullahtahiriyo
parent
afa40eaf87
commit
b9ed85a2de
@@ -26,15 +26,11 @@
|
||||
|
||||
using namespace Sketcher;
|
||||
|
||||
const int GeoEnum::RtPnt = -1;
|
||||
const int GeoEnum::HAxis = -1;
|
||||
const int GeoEnum::VAxis = -2;
|
||||
const int GeoEnum::RefExt = -3;
|
||||
const int GeoEnum::GeoUndef = -2000;
|
||||
|
||||
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);
|
||||
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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user