Mercurial > hg > orthanc-stone
diff Applications/Generic/GuiAdapter.cpp @ 1319:0290b7060167 broker
Build fix C++03
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Tue, 17 Mar 2020 08:57:45 +0100 |
parents | 8981bfca3457 |
children | 1b24f6b06408 |
line wrap: on
line diff
--- a/Applications/Generic/GuiAdapter.cpp Tue Mar 17 08:40:13 2020 +0100 +++ b/Applications/Generic/GuiAdapter.cpp Tue Mar 17 08:57:45 2020 +0100 @@ -681,7 +681,7 @@ if (sendEvent) { - auto func = sdlEventHandlers_[i].func; + OnSdlEventCallback func = sdlEventHandlers_[i].func; (*func)(canvasName, sdlEvent, sdlEventHandlers_[i].userData); } } @@ -913,12 +913,13 @@ } // SECOND: collect all user events - for (auto& it : userEventsMap) - sdlEvents.push_back(it.second); + for (std::map<Uint32,SDL_Event>::const_iterator it = userEventsMap.begin(); it != userEventsMap.end(); ++it) + sdlEvents.push_back(it->second); // now process the events - for(const SDL_Event& sdlEvent : sdlEvents) + for (std::vector<SDL_Event>::const_iterator it = sdlEvents.begin(); it != sdlEvents.end(); ++it) { + const SDL_Event& sdlEvent = *it; // TODO: lock all viewports here! (use a scoped object) if (sdlEvent.type == SDL_QUIT)