summaryrefslogtreecommitdiffstats
path: root/src/common/event.h
diff options
context:
space:
mode:
authorPiotr Dziwinski <piotrdz@gmail.com>2012-06-30 10:16:52 +0200
committerPiotr Dziwinski <piotrdz@gmail.com>2012-06-30 10:16:52 +0200
commit9a268f553869ee59288873e059ca938d404378c4 (patch)
treec4c5cc402e007ff58477d5ea6a458695f74521a0 /src/common/event.h
parente37019943cb77d8c0735b330339a139430202fd8 (diff)
downloadcolobot-9a268f553869ee59288873e059ca938d404378c4.tar.gz
colobot-9a268f553869ee59288873e059ca938d404378c4.tar.bz2
colobot-9a268f553869ee59288873e059ca938d404378c4.zip
Switched back to old standard; addded -Wall
- removed -std=c++11 - added -Wall and removed most reported warnings
Diffstat (limited to 'src/common/event.h')
-rw-r--r--src/common/event.h37
1 files changed, 12 insertions, 25 deletions
diff --git a/src/common/event.h b/src/common/event.h
index e7ff552..70b110d 100644
--- a/src/common/event.h
+++ b/src/common/event.h
@@ -637,31 +637,18 @@ struct Event
{
//! Type of event (EVENT_*)
EventType type;
- /**
- \union EventDataUnion
- \brief Additional data associated with some events
-
- For the listed event, the given member is filled with data.
- For other event types, it is filled with zeros.
- */
- union EventDataUnion
- {
- //! Additional data for EVENT_KEY_DOWN and EVENT_KEY_UP
- KeyEventData key;
- //! Additional data for EVENT_MOUSE_BUTTON_DOWN and EVENT_MOUSE_BUTTON_UP
- MouseButtonEventData mouseButton;
- //! Additional data for EVENT_MOUSE_MOVE
- MouseMoveEventData mouseMove;
- //! Additional data for EVENT_JOY
- JoyAxisEventData joyAxis;
- //! Additional data for EVENT_JOY_AXIS
- JoyButtonEventData joyButton;
-
- EventDataUnion()
- { memset(this, 0, sizeof(EventDataUnion)); }
- ~EventDataUnion()
- {}
- } data;
+
+ //! Additional data for EVENT_KEY_DOWN and EVENT_KEY_UP
+ KeyEventData key;
+ //! Additional data for EVENT_MOUSE_BUTTON_DOWN and EVENT_MOUSE_BUTTON_UP
+ MouseButtonEventData mouseButton;
+ //! Additional data for EVENT_MOUSE_MOVE
+ MouseMoveEventData mouseMove;
+ //! Additional data for EVENT_JOY
+ JoyAxisEventData joyAxis;
+ //! Additional data for EVENT_JOY_AXIS
+ JoyButtonEventData joyButton;
+
//? long param; // parameter
//? Math::Point pos; // mouse position (0 .. 1)
//? float axeX; // control the X axis (-1 .. 1)