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 {
|
struct RecorderEvent : Event {
|
||||||
RecorderEventType recordedtype;
|
RecorderEventType recordedtype;
|
||||||
uint32 time;
|
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()) {
|
if (((evt.type == Common::EVENT_LBUTTONDOWN) || (evt.type == Common::EVENT_LBUTTONUP) || (evt.type == Common::EVENT_MOUSEMOVE)) && _controlPanel->isMouseOver()) {
|
||||||
return Common::List<Common::Event>();
|
return Common::List<Common::Event>();
|
||||||
} else {
|
} else {
|
||||||
Common::RecorderEvent e;
|
Common::RecorderEvent e(ev);
|
||||||
memcpy(&e, &ev, sizeof(ev));
|
|
||||||
e.recordedtype = Common::kRecorderEventTypeNormal;
|
e.recordedtype = Common::kRecorderEventTypeNormal;
|
||||||
e.time = _fakeTimer;
|
e.time = _fakeTimer;
|
||||||
_playbackFile->writeEvent(e);
|
_playbackFile->writeEvent(e);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue