CBasicViewport: Make use of in-class initializers
This commit is contained in:
parent
464b417d24
commit
490e8dfd96
|
@ -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()
|
||||
{
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue