[Bf-blender-cvs] [a5f3c0e563c] master: Move assignments into initializer list for GHOST_EventButton and GHOST_EventCursor.

Nicholas Rishel noreply at git.blender.org
Sat Oct 31 00:32:25 CET 2020


Commit: a5f3c0e563ce36badeb5d12175bef8104d23f650
Author: Nicholas Rishel
Date:   Fri May 22 19:53:13 2020 -0700
Branches: master
https://developer.blender.org/rBa5f3c0e563ce36badeb5d12175bef8104d23f650

Move assignments into initializer list for GHOST_EventButton
and GHOST_EventCursor.

Signed-off-by: Nicholas Rishel <rishel.nick at gmail.com>

===================================================================

M	intern/ghost/intern/GHOST_EventButton.h
M	intern/ghost/intern/GHOST_EventCursor.h

===================================================================

diff --git a/intern/ghost/intern/GHOST_EventButton.h b/intern/ghost/intern/GHOST_EventButton.h
index 7072e0c5409..e1eb708c4bb 100644
--- a/intern/ghost/intern/GHOST_EventButton.h
+++ b/intern/ghost/intern/GHOST_EventButton.h
@@ -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;
   }
 
diff --git a/intern/ghost/intern/GHOST_EventCursor.h b/intern/ghost/intern/GHOST_EventCursor.h
index ba85cd74723..38e3fa64399 100644
--- a/intern/ghost/intern/GHOST_EventCursor.h
+++ b/intern/ghost/intern/GHOST_EventCursor.h
@@ -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;
   }



More information about the Bf-blender-cvs mailing list