CCollisionEditor: Tidy up code

This commit is contained in:
Lioncash 2020-06-28 02:47:31 -04:00
parent b42536fdea
commit ed20e622d7
2 changed files with 7 additions and 6 deletions

View File

@ -6,9 +6,9 @@
#include <QSlider>
#include <QSpacerItem>
CCollisionEditor::CCollisionEditor(CCollisionMeshGroup* pCollisionMesh, QWidget* pParent /*= 0*/)
CCollisionEditor::CCollisionEditor(CCollisionMeshGroup* pCollisionMesh, QWidget* pParent)
: IEditor(pParent)
, mpUI(new Ui::CCollisionEditor)
, mpUI(std::make_unique<Ui::CCollisionEditor>())
{
mpUI = std::make_unique<Ui::CCollisionEditor>();
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++)

View File

@ -5,6 +5,7 @@
#include "CCollisionEditorViewport.h"
#include <Core/Scene/CCollisionNode.h>
#include <Core/Scene/CScene.h>
#include <memory>
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);