From 8994a734dd006048b86f9d1d8dc9026245e49954 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 28 Jun 2020 07:05:46 -0400 Subject: [PATCH] WVectorEditor: Make use of in-class initializers where applicable --- src/Editor/Widgets/WVectorEditor.cpp | 2 +- src/Editor/Widgets/WVectorEditor.h | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/Editor/Widgets/WVectorEditor.cpp b/src/Editor/Widgets/WVectorEditor.cpp index 8ebeb20f..1784fb65 100644 --- a/src/Editor/Widgets/WVectorEditor.cpp +++ b/src/Editor/Widgets/WVectorEditor.cpp @@ -29,7 +29,7 @@ WVectorEditor::~WVectorEditor() delete mpLayout; } -CVector3f WVectorEditor::Value() +CVector3f WVectorEditor::Value() const { return mValue; } diff --git a/src/Editor/Widgets/WVectorEditor.h b/src/Editor/Widgets/WVectorEditor.h index ca6a1970..c597155a 100644 --- a/src/Editor/Widgets/WVectorEditor.h +++ b/src/Editor/Widgets/WVectorEditor.h @@ -30,10 +30,11 @@ class WVectorEditor : public QWidget QLabel *mpLabelZ; public: - explicit WVectorEditor(QWidget *pParent = 0); - WVectorEditor(const CVector3f& rkValue, QWidget *pParent = 0); - ~WVectorEditor(); - CVector3f Value(); + explicit WVectorEditor(QWidget *pParent = nullptr); + explicit WVectorEditor(const CVector3f& rkValue, QWidget *pParent = nullptr); + ~WVectorEditor() override; + + CVector3f Value() const; void SetOrientation(Qt::Orientation Orientation); void SetValue(const CVector3f& rkValue); void SetDefaultValue(double Value);