]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
Error at load time of _SMeshHelper.so
authorAnthony Geay <anthony.geay@edf.fr>
Wed, 13 Jan 2021 12:39:05 +0000 (13:39 +0100)
committerAnthony Geay <anthony.geay@edf.fr>
Wed, 13 Jan 2021 12:39:05 +0000 (13:39 +0100)
src/SMDS/SMDS_SpacePosition.cxx
src/SMDS/SMDS_SpacePosition.hxx

index 6a2dcf4c97e6c7abd24465ec7a9cf3db49bae128..9a484419dba030b6d63a4de99ce8240267199bf7 100644 (file)
 #include "SMDS_SpacePosition.hxx"
 #include "SMDS_VertexPosition.hxx"
 
-SMDS_SpacePosition* SMDS_SpacePosition::_originPosition = new SMDS_SpacePosition();
+SMDS_SpacePosition* SMDS_SpacePosition::__originPosition = nullptr;
 
 SMDS_PositionPtr SMDS_SpacePosition::originSpacePosition()
 {
-  return SMDS_PositionPtr( _originPosition, /*isOwner=*/false );
+  return SMDS_PositionPtr( _originPosition(), /*isOwner=*/false );
 }
 
 SMDS_PositionPtr SMDS_VertexPosition::StaticPosition()
@@ -42,3 +42,9 @@ SMDS_PositionPtr SMDS_VertexPosition::StaticPosition()
   return SMDS_PositionPtr( _vertexPosition, /*isOwner=*/false );
 }
 
+SMDS_SpacePosition *SMDS_SpacePosition::_originPosition()
+{
+  if(!__originPosition)
+    __originPosition = new SMDS_SpacePosition;
+  return __originPosition;
+}
\ No newline at end of file
index c3829010cad216edc6b87c137ea1bdabc9e6d83b..d5959870beb5833751cd320c3f8186bbcb9e54da 100644 (file)
@@ -40,7 +40,8 @@ class SMDS_EXPORT SMDS_SpacePosition : public SMDS_Position
   virtual const double* GetParameters() const { return 0; }
 
  private:
-  static SMDS_SpacePosition* _originPosition;
+  static SMDS_SpacePosition *_originPosition();
+  static SMDS_SpacePosition* __originPosition;
 };
 
 #endif