aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backends/events/default/default-events.cpp2
-rw-r--r--backends/events/default/default-events.h2
-rw-r--r--common/events.h2
3 files changed, 3 insertions, 3 deletions
diff --git a/backends/events/default/default-events.cpp b/backends/events/default/default-events.cpp
index 76a61d1342..3a77b0114c 100644
--- a/backends/events/default/default-events.cpp
+++ b/backends/events/default/default-events.cpp
@@ -474,7 +474,7 @@ bool DefaultEventManager::pollEvent(Common::Event &event) {
return result;
}
-void DefaultEventManager::pushEvent(Common::Event event) {
+void DefaultEventManager::pushEvent(const Common::Event &event) {
_artificialEventQueue.push(event);
}
diff --git a/backends/events/default/default-events.h b/backends/events/default/default-events.h
index 1a968cad0a..891ee3e744 100644
--- a/backends/events/default/default-events.h
+++ b/backends/events/default/default-events.h
@@ -117,7 +117,7 @@ public:
~DefaultEventManager();
virtual bool pollEvent(Common::Event &event);
- virtual void pushEvent(Common::Event event);
+ virtual void pushEvent(const Common::Event &event);
virtual void registerRandomSource(Common::RandomSource &rnd, const char *name);
virtual void processMillis(uint32 &millis);
diff --git a/common/events.h b/common/events.h
index 3e77824110..ba31610e92 100644
--- a/common/events.h
+++ b/common/events.h
@@ -145,7 +145,7 @@ public:
/**
* Pushes a "fake" event into the event queue
*/
- virtual void pushEvent(Common::Event event) = 0;
+ virtual void pushEvent(const Common::Event &event) = 0;
/** Register random source so it can be serialized in game test purposes **/
virtual void registerRandomSource(Common::RandomSource &rnd, const char *name) = 0;