EVENTRECORDER: Fix GCC Compiler Warnings
These were memcpy usage to copy a non-trivial structure.
This commit is contained in:
parent
011a9cd43f
commit
019de0cc23
2 changed files with 11 additions and 2 deletions
|
@ -44,6 +44,16 @@ enum RecorderEventType {
|
|||
struct RecorderEvent : Event {
|
||||
RecorderEventType recordedtype;
|
||||
uint32 time;
|
||||
|
||||
RecorderEvent() {
|
||||
recordedtype = kRecorderEventTypeNormal;
|
||||
time = 0;
|
||||
}
|
||||
|
||||
RecorderEvent(const Event &e) : Event(e) {
|
||||
recordedtype = kRecorderEventTypeNormal;
|
||||
time = 0;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -455,8 +455,7 @@ Common::List<Common::Event> EventRecorder::mapEvent(const Common::Event &ev, Com
|
|||
if (((evt.type == Common::EVENT_LBUTTONDOWN) || (evt.type == Common::EVENT_LBUTTONUP) || (evt.type == Common::EVENT_MOUSEMOVE)) && _controlPanel->isMouseOver()) {
|
||||
return Common::List<Common::Event>();
|
||||
} else {
|
||||
Common::RecorderEvent e;
|
||||
memcpy(&e, &ev, sizeof(ev));
|
||||
Common::RecorderEvent e(ev);
|
||||
e.recordedtype = Common::kRecorderEventTypeNormal;
|
||||
e.time = _fakeTimer;
|
||||
_playbackFile->writeEvent(e);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue