From 438332d39b5cc8a134e46e7724745cdd11e4e2b8 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Mon, 20 Jun 2016 16:50:21 +0100 Subject: [PATCH] Introduced local cursormap variable to make it clearer which containers are being worked upon. --- src/osgPlugins/osc/OscReceivingDevice.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/osgPlugins/osc/OscReceivingDevice.cpp b/src/osgPlugins/osc/OscReceivingDevice.cpp index 51a04b8c1..3ca662c0b 100644 --- a/src/osgPlugins/osc/OscReceivingDevice.cpp +++ b/src/osgPlugins/osc/OscReceivingDevice.cpp @@ -825,6 +825,7 @@ public: for(ApplicationCursorMap::iterator i = _alive.begin(); i != _alive.end(); ++i) { const std::string& source(i->first); + CursorMap& cursormap = i->second; /* std::cout << source << ": "; @@ -843,7 +844,7 @@ public: std::vector to_delete; - for(CursorMap::iterator k = i->second.begin(); k != i->second.end(); ++k) + for(CursorMap::iterator k = cursormap.begin(); k != cursormap.end(); ++k) { EndpointData& endpoint_data(_endpointData[k->second.end_point]); /*if (!endpoint_data.mayClearUnhandledPointer) @@ -872,7 +873,7 @@ public: // remove "dead" cursors for(std::vector::iterator k = to_delete.begin(); k != to_delete.end(); ++k) { - _alive[source].erase(i->second.find(*k)); + cursormap.erase(cursormap.find(*k)); } if (i->second.size() == 0)