From f8afb7a50839fc541457ba308c69f3e3dd381788 Mon Sep 17 00:00:00 2001 From: Emerson Knapp Date: Tue, 10 Mar 2020 17:47:07 -0700 Subject: [PATCH] Use a list instead of a set for node names list Signed-off-by: Emerson Knapp --- rmw_cyclonedds_cpp/src/rmw_node.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rmw_cyclonedds_cpp/src/rmw_node.cpp b/rmw_cyclonedds_cpp/src/rmw_node.cpp index dd096410..1eb41431 100644 --- a/rmw_cyclonedds_cpp/src/rmw_node.cpp +++ b/rmw_cyclonedds_cpp/src/rmw_node.cpp @@ -2884,14 +2884,14 @@ extern "C" rmw_ret_t rmw_get_node_names( return RMW_RET_ERROR; } - std::set> ns; + std::vector> ns; const auto re = std::regex("^name=(.*);namespace=(.*);$", std::regex::extended); auto oper = [&ns, re](const dds_builtintopic_participant_t & sample, const char * ud) -> bool { std::cmatch cm; static_cast(sample); if (std::regex_search(ud, cm, re)) { - ns.insert(std::make_pair(std::string(cm[1]), std::string(cm[2]))); + ns.push_back(std::make_pair(std::string(cm[1]), std::string(cm[2]))); } return true; };