Salome HOME
Revert "23418: [OCC] Mesh: Minimization of memory usage of SMESH"
[modules/smesh.git] / src / SMESH_I / SMESH_PreMeshInfo.cxx
index c2181296c5aab928de37fd7ced292a0ee7d792e3..c7e753d89c3d5f9cda95af08eb166be2aa8b14c6 100644 (file)
@@ -1059,7 +1059,8 @@ void SMESH_PreMeshInfo::readSubMeshes(DriverMED_R_SMESHDS_Mesh* reader) const
             // -- Most probably a bad study was saved when there were
             // not fixed bugs in SMDS_MeshInfo
             if ( aPos->GetTypeOfPosition() == SMDS_TOP_FACE ) {
-              SMDS_FacePositionPtr fPos = aPos;
+              SMDS_FacePosition* fPos = const_cast<SMDS_FacePosition*>
+                ( static_cast<const SMDS_FacePosition*>( aPos ));
               fPos->SetUParameter( aUPos[ iNode ]);
               fPos->SetVParameter( aVPos[ iNode ]);
             }
@@ -1067,8 +1068,9 @@ void SMESH_PreMeshInfo::readSubMeshes(DriverMED_R_SMESHDS_Mesh* reader) const
           else {
             // ASSERT( aPos->GetTypeOfPosition() == SMDS_TOP_EDGE );-- issue 20182
             if ( aPos->GetTypeOfPosition() == SMDS_TOP_EDGE ) {
-              SMDS_EdgePositionPtr ePos = aPos;
-              ePos->SetUParameter( aUPos[ iNode ]);
+              SMDS_EdgePosition* fPos = const_cast<SMDS_EdgePosition*>
+                ( static_cast<const SMDS_EdgePosition*>( aPos ));
+              fPos->SetUParameter( aUPos[ iNode ]);
             }
           }
         }