Move assignments into initializer list for GHOST_EventButton

and GHOST_EventCursor.

Signed-off-by: Nicholas Rishel <rishel.nick@gmail.com>
This commit is contained in:
Nicholas Rishel 2020-05-22 19:53:13 -07:00
parent 1b535e8719
commit a5f3c0e563
2 changed files with 2 additions and 7 deletions

View File

@ -45,10 +45,8 @@ class GHOST_EventButton : public GHOST_Event {
GHOST_IWindow *window,
GHOST_TButtonMask button,
const GHOST_TabletData &tablet)
: GHOST_Event(time, type, window)
: GHOST_Event(time, type, window), m_buttonEventData({button, tablet})
{
m_buttonEventData.button = button;
m_buttonEventData.tablet = tablet;
m_data = &m_buttonEventData;
}

View File

@ -45,11 +45,8 @@ class GHOST_EventCursor : public GHOST_Event {
GHOST_TInt32 x,
GHOST_TInt32 y,
const GHOST_TabletData &tablet)
: GHOST_Event(msec, type, window)
: GHOST_Event(msec, type, window), m_cursorEventData({x, y, tablet})
{
m_cursorEventData.x = x;
m_cursorEventData.y = y;
m_cursorEventData.tablet = tablet;
m_data = &m_cursorEventData;
}