Skip to content

Commit

Permalink
fix showing duplicate keys in --print-pairs (#225)
Browse files Browse the repository at this point in the history
Signed-off-by: Dirk Thomas <[email protected]>
  • Loading branch information
dirk-thomas committed Dec 5, 2019
1 parent 46baa88 commit a7462b7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions include/ros1_bridge/bridge.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ get_2to1_mapping(
const std::string & ros2_type_name,
std::string & ros1_type_name);

std::map<std::string, std::string>
std::multimap<std::string, std::string>
get_all_message_mappings_2to1();

std::map<std::string, std::string>
std::multimap<std::string, std::string>
get_all_service_mappings_2to1();

std::shared_ptr<FactoryInterface>
Expand Down
8 changes: 4 additions & 4 deletions resource/get_mappings.cpp.em
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ get_2to1_mapping(const std::string & ros2_type_name, std::string & ros1_type_nam
return false;
}

std::map<std::string, std::string>
std::multimap<std::string, std::string>
get_all_message_mappings_2to1()
{
static std::map<std::string, std::string> mappings = {
static std::multimap<std::string, std::string> mappings = {
@[for m in mappings]@
{
"@(m.ros2_msg.package_name)/msg/@(m.ros2_msg.message_name)", // ROS 2
Expand All @@ -75,10 +75,10 @@ get_all_message_mappings_2to1()
return mappings;
}

std::map<std::string, std::string>
std::multimap<std::string, std::string>
get_all_service_mappings_2to1()
{
static std::map<std::string, std::string> mappings = {
static std::multimap<std::string, std::string> mappings = {
@[for s in services]@
{
"@(s['ros2_package'])/srv/@(s['ros2_name'])", // ROS 2
Expand Down

0 comments on commit a7462b7

Please sign in to comment.