diff --git a/cpp/mwmatching.h b/cpp/mwmatching.h index a98bc7f..9fffe4a 100644 --- a/cpp/mwmatching.h +++ b/cpp/mwmatching.h @@ -1231,7 +1231,7 @@ public: assert(path.edges.size() % 2 == 1); assert(path.edges.size() >= 3); - // Construct the list of sub-blossoms. + // Collect pointers to sub-blossoms. std::vector subblossoms; subblossoms.reserve(path.edges.size()); for (VertexPair edge : path.edges) { @@ -1277,8 +1277,8 @@ public: } // Merge concatenable queues. -// TODO -- avoid temporary array std::vector subqueues; + subqueues.reserve(subblossoms.size()); for (BlossomT* sub : subblossoms) { subqueues.push_back(&sub->vertex_queue); }