diff --git a/graf3d/eve7/inc/ROOT/REveCsgOps.hxx b/graf3d/eve7/inc/ROOT/REveCsgOps.hxx index 7d781351e202f5d1741f24edbc8eee30506a3f0f..0ef47ab2d004008b74add205b3046d8100275f01 100644 --- a/graf3d/eve7/inc/ROOT/REveCsgOps.hxx +++ b/graf3d/eve7/inc/ROOT/REveCsgOps.hxx @@ -26,12 +26,9 @@ public: virtual Int_t GetVertexIndex(Int_t polyNum, Int_t vertNum) const = 0; }; -TBaseMesh *ConvertToMesh(const TBuffer3D &buff, TGeoMatrix *matr = nullptr); -TBaseMesh *BuildUnion(const TBaseMesh *leftOperand, const TBaseMesh *rightOperand); -TBaseMesh *BuildIntersection(const TBaseMesh *leftOperand, const TBaseMesh *rightOperand); -TBaseMesh *BuildDifference(const TBaseMesh *leftOperand, const TBaseMesh *rightOperand); -TBaseMesh *BuildFromCompositeShape(TGeoCompositeShape *cshape, Int_t n_seg); -TBaseMesh *BuildFromCompositeShapeNew(TGeoCompositeShape *cshape, Int_t n_seg); +// TBaseMesh *BuildFromCompositeShape(TGeoCompositeShape *cshape, Int_t n_seg); + +std::unique_ptr<TBaseMesh> BuildFromCompositeShapeNew(TGeoCompositeShape *cshape, Int_t n_seg); } // namespace EveCsg diff --git a/graf3d/eve7/src/REveCsgOps.cxx b/graf3d/eve7/src/REveCsgOps.cxx index 1f87aaf2cd471a6e8b92920fbfc524cddd8026d0..9513f11b282e41f64187e9d85ea534bccfe1d373 100644 --- a/graf3d/eve7/src/REveCsgOps.cxx +++ b/graf3d/eve7/src/REveCsgOps.cxx @@ -2820,7 +2820,7 @@ Int_t TCsgVV3D::AddObject(const TBuffer3D& buffer, Bool_t* addChildren) { if (fCompositeOpen) { - auto newMesh = ConvertToMesh(buffer); + auto newMesh = ConvertToMesh(buffer, nullptr); fCSTokens.push_back(std::make_pair(TBuffer3D::kCSNoOp, newMesh)); } @@ -2971,10 +2971,9 @@ std::unique_ptr<TBaseMesh> MakeMesh(TGeoMatrix *matr, TGeoShape *shape) return res; } -TBaseMesh *BuildFromCompositeShapeNew(TGeoCompositeShape *cshape, Int_t n_seg) +std::unique_ptr<TBaseMesh> BuildFromCompositeShapeNew(TGeoCompositeShape *cshape, Int_t n_seg) { - auto res = MakeMesh(nullptr, cshape); - return res.release(); + return MakeMesh(nullptr, cshape); } diff --git a/graf3d/eve7/src/REveGeoPolyShape.cxx b/graf3d/eve7/src/REveGeoPolyShape.cxx index 26ecf7262b30c953c190ef19bf48ec8c00ec6e0c..052b532d33109cadede3f20ad560c37c46482971 100644 --- a/graf3d/eve7/src/REveGeoPolyShape.cxx +++ b/graf3d/eve7/src/REveGeoPolyShape.cxx @@ -65,9 +65,8 @@ REveGeoPolyShape* REveGeoPolyShape::Construct(TGeoCompositeShape *cshape, Int_t egps->fDY = cshape->GetDY(); egps->fDZ = cshape->GetDZ(); - EveCsg::TBaseMesh *mesh = EveCsg::BuildFromCompositeShapeNew(cshape, n_seg); - egps->SetFromMesh(mesh); - delete mesh; + auto mesh = EveCsg::BuildFromCompositeShapeNew(cshape, n_seg); + egps->SetFromMesh(mesh.get()); return egps; }