diff --git a/Algorithms/StronglyConnectedComponents.h b/Algorithms/StronglyConnectedComponents.h index e0245ef38..e94ea7ac3 100644 --- a/Algorithms/StronglyConnectedComponents.h +++ b/Algorithms/StronglyConnectedComponents.h @@ -96,7 +96,7 @@ private: typedef std::pair RestrictionSource; typedef std::pair restriction_target; typedef std::vector EmanatingRestrictionsVector; - typedef boost::unordered_map RestrictionMap; + typedef boost::unordered_map RestrictionMap; std::vector m_coordinate_list; std::vector m_restriction_bucket_list; @@ -145,7 +145,7 @@ public: if(restriction_iterator == m_restriction_map.end()) { index = m_restriction_bucket_list.size(); m_restriction_bucket_list.resize(index+1); - m_restriction_map[restrictionSource] = index; + m_restriction_map.insert(std::make_pair(restrictionSource, index)); } else { index = restriction_iterator->second; //Map already contains an is_only_*-restriction @@ -358,6 +358,7 @@ public: "identified: " << component_size_vector.size() << " many components, marking small components"; + // TODO/C++11: prime candidate for lambda function unsigned size_one_counter = 0; for(unsigned i = 0, end = component_size_vector.size(); i < end; ++i){ if(1 == component_size_vector[i]) {