diff --git a/src/Editor/CBasicViewport.cpp b/src/Editor/CBasicViewport.cpp index a81224ac..260800c7 100644 --- a/src/Editor/CBasicViewport.cpp +++ b/src/Editor/CBasicViewport.cpp @@ -8,11 +8,6 @@ CBasicViewport::CBasicViewport(QWidget *pParent) : QOpenGLWidget(pParent) - , mLastDrawTime(CTimer::GlobalTime()) - , mKeysPressed(0) - , mButtonsPressed(0) - , mCursorState(Qt::ArrowCursor) - , mCursorVisible(true) { setMouseTracking(true); mCamera.SetAspectRatio((float) width() / height()); @@ -21,9 +16,7 @@ CBasicViewport::CBasicViewport(QWidget *pParent) mViewInfo.GameMode = false; } -CBasicViewport::~CBasicViewport() -{ -} +CBasicViewport::~CBasicViewport() = default; void CBasicViewport::initializeGL() { diff --git a/src/Editor/CBasicViewport.h b/src/Editor/CBasicViewport.h index 18ead8d4..4c985146 100644 --- a/src/Editor/CBasicViewport.h +++ b/src/Editor/CBasicViewport.h @@ -21,19 +21,19 @@ protected: // Render CCamera mCamera; CTimer mFrameTimer; - double mLastDrawTime; + double mLastDrawTime = CTimer::GlobalTime(); SViewInfo mViewInfo; // Cursor settings - QCursor mCursorState; - bool mCursorVisible; + QCursor mCursorState{Qt::ArrowCursor}; + bool mCursorVisible = true; // Input QPoint mLastMousePos; - bool mMouseMoved; + bool mMouseMoved = false; CTimer mMoveTimer; - FMouseInputs mButtonsPressed; - FKeyInputs mKeysPressed; + FMouseInputs mButtonsPressed{0}; + FKeyInputs mKeysPressed{0}; public: explicit CBasicViewport(QWidget *pParent = nullptr);