diff options
author | D G Turner | 2019-07-24 21:57:35 +0100 |
---|---|---|
committer | D G Turner | 2019-07-24 21:57:35 +0100 |
commit | af850a3e372495fe527be4c81ced3a57cbbe490d (patch) | |
tree | c0120d4eebb803767233b9ee7e5afcedbbf0f276 /engines/cge/events.cpp | |
parent | 47811167d5ddd9cbf64099ad36f2da5ae413fc86 (diff) | |
download | scummvm-rg350-af850a3e372495fe527be4c81ced3a57cbbe490d.tar.gz scummvm-rg350-af850a3e372495fe527be4c81ced3a57cbbe490d.tar.bz2 scummvm-rg350-af850a3e372495fe527be4c81ced3a57cbbe490d.zip |
CGE: Fix GCC Warnings by Explicit Structure Initialization
Some of the members of the structures do not need this as they have
constructors which do this implicitly.
Diffstat (limited to 'engines/cge/events.cpp')
-rw-r--r-- | engines/cge/events.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/engines/cge/events.cpp b/engines/cge/events.cpp index d7c065ef6a..0cc32ce11d 100644 --- a/engines/cge/events.cpp +++ b/engines/cge/events.cpp @@ -238,8 +238,15 @@ void Mouse::newMouse(Common::Event &event) { EventManager::EventManager(CGEEngine *vm) : _vm(vm){ _eventQueueHead = 0; _eventQueueTail = 0; - memset(&_eventQueue, 0, kEventMax * sizeof(CGEEvent)); - memset(&_event, 0, sizeof(Common::Event)); + for (uint16 k = 0; k < kEventMax; k++) { + _eventQueue[k]._mask = 0; + _eventQueue[k]._x = 0; + _eventQueue[k]._y = 0; + _eventQueue[k]._spritePtr = nullptr; + } + _event.joystick.axis = 0; + _event.joystick.position = 0; + _event.joystick.button = 0; } void EventManager::poll() { |