[Scummvm-git-logs] scummvm master -> 3b466e65be5dfcea7a6c45c28cbd9c5ca73cd7ea

bluegr noreply at scummvm.org
Sat Mar 2 12:10:16 UTC 2024


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
3b466e65be COMMON: move mappedEvents declaration out of for loop


Commit: 3b466e65be5dfcea7a6c45c28cbd9c5ca73cd7ea
    https://github.com/scummvm/scummvm/commit/3b466e65be5dfcea7a6c45c28cbd9c5ca73cd7ea
Author: Giovanni Cascione (ing.cascione at gmail.com)
Date: 2024-03-02T14:10:13+02:00

Commit Message:
COMMON: move mappedEvents declaration out of for loop

Changed paths:
    common/events.cpp


diff --git a/common/events.cpp b/common/events.cpp
index 98c8cb0ae51..5874a5cdcdd 100644
--- a/common/events.cpp
+++ b/common/events.cpp
@@ -71,6 +71,7 @@ EventDispatcher::~EventDispatcher() {
 
 void EventDispatcher::dispatch() {
 	Event event;
+	List<Event> mappedEvents;
 
 	dispatchPoll();
 
@@ -91,7 +92,7 @@ void EventDispatcher::dispatch() {
 				assert(event.type != EVENT_CUSTOM_ENGINE_ACTION_END);
 
 				for (List<MapperEntry>::iterator m = _mappers.begin(); m != _mappers.end(); ++m) {
-					List<Event> mappedEvents;
+					mappedEvents.clear();
 					if (!m->mapper->mapEvent(event, mappedEvents))
 						continue;
 




More information about the Scummvm-git-logs mailing list