From 6dd3ea5cc2bdf89683ccba4761e3e0b2010786bd Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Sat, 1 Nov 2025 17:24:43 +0100 Subject: [PATCH] EgtGeomKernel 2.7k1 : - aggiustamenti e ricompilazione per passaggio a C++ 20 --- EgtGeomKernel.rc | Bin 11718 -> 11718 bytes EgtGeomKernel.vcxproj | 8 ++--- ExtDimension.cpp | 2 +- GeoObjFactory.h | 70 +++++++++++++++++++++--------------------- Voronoi.cpp | 1 + Voronoi.h | 2 +- 6 files changed, 42 insertions(+), 41 deletions(-) diff --git a/EgtGeomKernel.rc b/EgtGeomKernel.rc index 05c555e18ebf5c6812f12b11d237dccd4fc847e2..97503c860207c7daf927c438ef4cfa4edb1f79e9 100644 GIT binary patch delta 134 zcmX>WeJpyz4>ndq1|0^&&G-4vGfl1&(wY2&Q-wL3!EmyouWeJpyz4>nc<1|0^|&G-4vGfl1&(wY2&Q-wK;!E~~sutrue ProgramDatabase false - stdcpp17 + stdcpp20 Windows @@ -151,7 +151,7 @@ copy $(TargetPath) \EgtProg\DllD32 false true ProgramDatabase - stdcpp17 + stdcpp20 -Wno-tautological-undefined-compare @@ -199,7 +199,7 @@ copy $(TargetPath) \EgtProg\DllD64 true false ProgramDatabase - stdcpp17 + stdcpp20 Windows @@ -245,7 +245,7 @@ copy $(TargetPath) \EgtProg\Dll32 false false None - stdcpp17 + stdcpp20 -Wno-tautological-undefined-compare true diff --git a/ExtDimension.cpp b/ExtDimension.cpp index dd664ee..c5a337d 100644 --- a/ExtDimension.cpp +++ b/ExtDimension.cpp @@ -1087,7 +1087,7 @@ ExtDimension::Update( void) const if ( m_nType == DT_RADIAL) sVal = "R " + sVal ; else if ( m_nType == DT_DIAMETRAL) - sVal = u8"\u00D8 " + sVal ; + sVal = reinterpret_cast( u8"\u00D8") + sVal ; ReplaceString( m_sCalcText, IS_MEASURE, sVal) ; } // punto di inserimento del testo diff --git a/GeoObjFactory.h b/GeoObjFactory.h index 841bb62..f545d3c 100644 --- a/GeoObjFactory.h +++ b/GeoObjFactory.h @@ -28,41 +28,6 @@ #define GEOOBJ_NGEIDTOTYPE( nNgeId) GeoObjFactory::NgeIdToType( nNgeId) #define GEOOBJ_CREATE( nKey) GeoObjFactory::Create( nKey) -//---------------------------------------------------------------------------- -template -class GeoObjRegister -{ - public : - static bool DoRegister( int nKey, int nNgeId) - { if ( ! GeoObjFactory::Register( nKey, NgeAscKeyW[nNgeId], nNgeId, Create)) - return false ; - GetTypePrivate() = nKey ; - GetKeyPrivate() = NgeAscKeyW[nNgeId] ; - GetNgeIdPrivate() = nNgeId ; - return true ; } - static IGeoObj* Create( void) - { return new( std::nothrow) T ; } - static int GetType( void) - { return GetTypePrivate() ; } - static const std::string& GetKey( void) - { return GetKeyPrivate() ; } - static int GetNgeId( void) - { return GetNgeIdPrivate() ; } - - private : - GeoObjRegister( void) {} - ~GeoObjRegister( void) {} - static int& GetTypePrivate( void) - { static int s_nType ; - return s_nType ; } - static std::string& GetKeyPrivate( void) - { static std::string s_sKey ; - return s_sKey ; } - static int& GetNgeIdPrivate( void) - { static int s_nNgeId ; - return s_nNgeId ; } -} ; - //---------------------------------------------------------------------------- class GeoObjFactory { @@ -117,3 +82,38 @@ class GeoObjFactory { static CreatorMap s_CreatorMap ; return s_CreatorMap ; } } ; + +//---------------------------------------------------------------------------- +template +class GeoObjRegister +{ + public : + static bool DoRegister( int nKey, int nNgeId) + { if ( ! GeoObjFactory::Register( nKey, NgeAscKeyW[nNgeId], nNgeId, Create)) + return false ; + GetTypePrivate() = nKey ; + GetKeyPrivate() = NgeAscKeyW[nNgeId] ; + GetNgeIdPrivate() = nNgeId ; + return true ; } + static IGeoObj* Create( void) + { return new( std::nothrow) T ; } + static int GetType( void) + { return GetTypePrivate() ; } + static const std::string& GetKey( void) + { return GetKeyPrivate() ; } + static int GetNgeId( void) + { return GetNgeIdPrivate() ; } + + private : + GeoObjRegister( void) {} + ~GeoObjRegister( void) {} + static int& GetTypePrivate( void) + { static int s_nType ; + return s_nType ; } + static std::string& GetKeyPrivate( void) + { static std::string s_sKey ; + return s_sKey ; } + static int& GetNgeIdPrivate( void) + { static int s_nNgeId ; + return s_nNgeId ; } +} ; diff --git a/Voronoi.cpp b/Voronoi.cpp index 0146793..bc92e76 100644 --- a/Voronoi.cpp +++ b/Voronoi.cpp @@ -21,6 +21,7 @@ #include "Voronoi.h" #include "/EgtDev/Include/EGkDistPointCurve.h" #include "/EgtDev/Include/EGkChainCurves.h" +#include "/EgtDev/Extern/vroni/Include/vroni_object.h" using namespace std ; diff --git a/Voronoi.h b/Voronoi.h index d0f033b..e39ad3a 100644 --- a/Voronoi.h +++ b/Voronoi.h @@ -19,7 +19,6 @@ #include "/EgtDev/Include/EGkCurveBezier.h" #include "/EgtDev/Include/EGkCurveComposite.h" #include "/EgtDev/Include/EGkCurveLine.h" -#include "/EgtDev/Extern/vroni/Include/vroni_object.h" //---------------------------------------------------------------------------- static const bool USE_VORONOI = true ; @@ -30,6 +29,7 @@ static const double VRONI_JUNCTION_CLOSED = 2.0 ; //-------------------------- Forward Definitions ------------------------------- class ISurfFlatRegion ; +class vroniObject ; //---------------------------------------------------------------------------- class Voronoi