diff --git a/source/tools/atlas/AtlasUI/ScenarioEditor/Sections/Map/Map.cpp b/source/tools/atlas/AtlasUI/ScenarioEditor/Sections/Map/Map.cpp index f7939bf972..132d0b3ae1 100644 --- a/source/tools/atlas/AtlasUI/ScenarioEditor/Sections/Map/Map.cpp +++ b/source/tools/atlas/AtlasUI/ScenarioEditor/Sections/Map/Map.cpp @@ -124,7 +124,6 @@ class AtObjClientData : public wxClientData { public: AtObjClientData(const AtObj& obj) : obj(obj) {} - virtual ~AtObjClientData() {} AtObj GetValue() { return obj; } private: AtObj obj; diff --git a/source/tools/atlas/AtlasUI/ScenarioEditor/Sections/Object/Object.cpp b/source/tools/atlas/AtlasUI/ScenarioEditor/Sections/Object/Object.cpp index 5a06f40261..5dcbf64a7a 100644 --- a/source/tools/atlas/AtlasUI/ScenarioEditor/Sections/Object/Object.cpp +++ b/source/tools/atlas/AtlasUI/ScenarioEditor/Sections/Object/Object.cpp @@ -316,17 +316,12 @@ ObjectSidebar::ObjectSidebar( bottomBarContainer, scenarioEditor.GetObjectSettings(), scenarioEditor.GetMapSettings(), - m_Impl + m_Impl.get() ); m_Impl->m_ToolConn = scenarioEditor.GetToolManager().GetCurrentTool().RegisterObserver(0, &ObjectSidebar::OnToolChange, this); } -ObjectSidebar::~ObjectSidebar() -{ - delete m_Impl; -} - void ObjectSidebar::OnToolChange(ITool* tool) { if (wxString(tool->GetClassInfo()->GetClassName()) == _T("ActorViewerTool")) diff --git a/source/tools/atlas/AtlasUI/ScenarioEditor/Sections/Object/Object.h b/source/tools/atlas/AtlasUI/ScenarioEditor/Sections/Object/Object.h index a634bf9691..cb106a2feb 100644 --- a/source/tools/atlas/AtlasUI/ScenarioEditor/Sections/Object/Object.h +++ b/source/tools/atlas/AtlasUI/ScenarioEditor/Sections/Object/Object.h @@ -17,6 +17,7 @@ #include "tools/atlas/AtlasUI/ScenarioEditor/Sections/Common/Sidebar.h" +#include #include class ITool; @@ -28,7 +29,6 @@ class ObjectSidebar : public Sidebar { public: ObjectSidebar(ScenarioEditor& scenarioEditor, wxWindow* sidebarContainer, wxWindow* bottomBarContainer); - ~ObjectSidebar(); void FilterObjects(); @@ -43,7 +43,7 @@ private: void OnSelectObject(wxCommandEvent& evt); void OnToggleExactFilter(wxCommandEvent& evt); - ObjectSidebarImpl* m_Impl; + std::unique_ptr m_Impl; DECLARE_EVENT_TABLE(); };