From fadb2919625f72b7f0fbff17478ac467a86e657b Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Mon, 27 Jul 2015 17:14:49 -0700 Subject: [PATCH] Fix infinite loop typo. --- node/SelfAwareness.hpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/node/SelfAwareness.hpp b/node/SelfAwareness.hpp index 9fcefa62f..1b160a3f4 100644 --- a/node/SelfAwareness.hpp +++ b/node/SelfAwareness.hpp @@ -72,10 +72,12 @@ public: inline std::vector< std::pair > getReportedSurface() const { std::vector< std::pair > r; - Mutex::Lock _l(_phy_m); - r.reserve(_phy.size()); - for(std::map< PhySurfaceKey,PhySurfaceEntry >::const_iterator p(_phy.begin());p!=_phy.end();) - r.push_back(std::pair(p->first.reporter,p->second.mySurface)); + { + Mutex::Lock _l(_phy_m); + r.reserve(_phy.size()); + for(std::map< PhySurfaceKey,PhySurfaceEntry >::const_iterator p(_phy.begin());p!=_phy.end();++p) + r.push_back(std::pair(p->first.reporter,p->second.mySurface)); + } return r; }