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 <QSlider>
#include <QSpacerItem> #include <QSpacerItem>
CCollisionEditor::CCollisionEditor(CCollisionMeshGroup* pCollisionMesh, QWidget* pParent /*= 0*/) CCollisionEditor::CCollisionEditor(CCollisionMeshGroup* pCollisionMesh, QWidget* pParent)
: IEditor(pParent) : IEditor(pParent)
, mpUI(new Ui::CCollisionEditor) , mpUI(std::make_unique<Ui::CCollisionEditor>())
{ {
mpUI = std::make_unique<Ui::CCollisionEditor>(); mpUI = std::make_unique<Ui::CCollisionEditor>();
mpUI->setupUi(this); mpUI->setupUi(this);
@ -28,7 +28,7 @@ CCollisionEditor::CCollisionEditor(CCollisionMeshGroup* pCollisionMesh, QWidget*
// Add depth widgets to the toolbar // Add depth widgets to the toolbar
mpUI->ToolBar->addSeparator(); mpUI->ToolBar->addSeparator();
mpUI->ToolBar->addWidget( new QLabel("OBBTree: ", this) ); mpUI->ToolBar->addWidget(new QLabel("OBBTree: ", this));
int MaxDepth = 0; int MaxDepth = 0;
for (size_t MeshIdx = 0; MeshIdx < pCollisionMesh->NumMeshes(); MeshIdx++) for (size_t MeshIdx = 0; MeshIdx < pCollisionMesh->NumMeshes(); MeshIdx++)

View File

@ -5,6 +5,7 @@
#include "CCollisionEditorViewport.h" #include "CCollisionEditorViewport.h"
#include <Core/Scene/CCollisionNode.h> #include <Core/Scene/CCollisionNode.h>
#include <Core/Scene/CScene.h> #include <Core/Scene/CScene.h>
#include <memory>
namespace Ui { namespace Ui {
class CCollisionEditor; class CCollisionEditor;
@ -27,9 +28,9 @@ class CCollisionEditor : public IEditor
public: public:
/** Constructor/destructor */ /** Constructor/destructor */
explicit CCollisionEditor(CCollisionMeshGroup* pCollisionMesh, QWidget* pParent = 0); explicit CCollisionEditor(CCollisionMeshGroup* pCollisionMesh, QWidget* pParent = nullptr);
virtual ~CCollisionEditor(); ~CCollisionEditor() override;
virtual CCollisionEditorViewport* Viewport() const override; CCollisionEditorViewport* Viewport() const override;
public slots: public slots:
void OnGridToggled(bool Enabled); void OnGridToggled(bool Enabled);