From ed20e622d7c1b6386d4990c062b433dad6fa3063 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 28 Jun 2020 02:47:31 -0400 Subject: [PATCH] CCollisionEditor: Tidy up code --- src/Editor/CollisionEditor/CCollisionEditor.cpp | 6 +++--- src/Editor/CollisionEditor/CCollisionEditor.h | 7 ++++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/Editor/CollisionEditor/CCollisionEditor.cpp b/src/Editor/CollisionEditor/CCollisionEditor.cpp index 1f467d28..67c56923 100644 --- a/src/Editor/CollisionEditor/CCollisionEditor.cpp +++ b/src/Editor/CollisionEditor/CCollisionEditor.cpp @@ -6,9 +6,9 @@ #include #include -CCollisionEditor::CCollisionEditor(CCollisionMeshGroup* pCollisionMesh, QWidget* pParent /*= 0*/) +CCollisionEditor::CCollisionEditor(CCollisionMeshGroup* pCollisionMesh, QWidget* pParent) : IEditor(pParent) - , mpUI(new Ui::CCollisionEditor) + , mpUI(std::make_unique()) { mpUI = std::make_unique(); mpUI->setupUi(this); @@ -28,7 +28,7 @@ CCollisionEditor::CCollisionEditor(CCollisionMeshGroup* pCollisionMesh, QWidget* // Add depth widgets to the toolbar mpUI->ToolBar->addSeparator(); - mpUI->ToolBar->addWidget( new QLabel("OBBTree: ", this) ); + mpUI->ToolBar->addWidget(new QLabel("OBBTree: ", this)); int MaxDepth = 0; for (size_t MeshIdx = 0; MeshIdx < pCollisionMesh->NumMeshes(); MeshIdx++) diff --git a/src/Editor/CollisionEditor/CCollisionEditor.h b/src/Editor/CollisionEditor/CCollisionEditor.h index b6ad0a69..6d125268 100644 --- a/src/Editor/CollisionEditor/CCollisionEditor.h +++ b/src/Editor/CollisionEditor/CCollisionEditor.h @@ -5,6 +5,7 @@ #include "CCollisionEditorViewport.h" #include #include +#include namespace Ui { class CCollisionEditor; @@ -27,9 +28,9 @@ class CCollisionEditor : public IEditor public: /** Constructor/destructor */ - explicit CCollisionEditor(CCollisionMeshGroup* pCollisionMesh, QWidget* pParent = 0); - virtual ~CCollisionEditor(); - virtual CCollisionEditorViewport* Viewport() const override; + explicit CCollisionEditor(CCollisionMeshGroup* pCollisionMesh, QWidget* pParent = nullptr); + ~CCollisionEditor() override; + CCollisionEditorViewport* Viewport() const override; public slots: void OnGridToggled(bool Enabled);