From 13d5a444312f6dbd649d56dff2176839734c0cb6 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Wed, 7 Apr 2021 17:25:25 -0700 Subject: [PATCH] visio plugin: manage _fill member of Graphic as a smart pointer --- plugin/visio/VisioGraphic.cpp | 6 ------ plugin/visio/VisioGraphic.h | 4 +--- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/plugin/visio/VisioGraphic.cpp b/plugin/visio/VisioGraphic.cpp index 33abae133..26fabb27d 100644 --- a/plugin/visio/VisioGraphic.cpp +++ b/plugin/visio/VisioGraphic.cpp @@ -529,12 +529,6 @@ namespace Visio { } - Graphic::~Graphic() - { - if (_fill) - delete _fill; - } - boxf Graphic::GetBounds() const { return _geom->GetBounds(); diff --git a/plugin/visio/VisioGraphic.h b/plugin/visio/VisioGraphic.h index 99dc9f22d..42d16ecdb 100644 --- a/plugin/visio/VisioGraphic.h +++ b/plugin/visio/VisioGraphic.h @@ -155,8 +155,6 @@ namespace Visio static Graphic* CreatePolygon(GVJ_t* job, pointf* A, int n, bool filled); static Graphic* CreatePolyline(GVJ_t* job, pointf* A, int n); - ~Graphic(); - boxf GetBounds() const; const Connection* GetConnection() const; @@ -166,7 +164,7 @@ namespace Visio Graphic(const Line &line, Fill* fill, Geom* geom); Line _line; - Fill* _fill; + std::unique_ptr _fill; std::unique_ptr _geom; }; } -- 2.40.0