File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
tesseract_common/include/tesseract_common Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -833,11 +833,11 @@ struct convert<tesseract_common::AllowedCollisionMatrix>
833833 }
834834};
835835
836- // ============================== std::unordered_map<std::string, bool> =============================
837- template <>
838- struct convert <std::unordered_map<std::string, bool >>
836+ // ============================== std::unordered_map =============================
837+ template <typename T, typename A >
838+ struct convert <std::unordered_map<T, A >>
839839{
840- static Node encode (const std::unordered_map<std::string, bool >& rhs)
840+ static Node encode (const std::unordered_map<T, A >& rhs)
841841 {
842842 Node node (NodeType::Map);
843843 for (const auto & pair : rhs)
@@ -846,13 +846,13 @@ struct convert<std::unordered_map<std::string, bool>>
846846 return node;
847847 }
848848
849- static bool decode (const Node& node, std::unordered_map<std::string, bool >& rhs)
849+ static bool decode (const Node& node, std::unordered_map<T, A >& rhs)
850850 {
851851 if (!node.IsMap ())
852852 return false ;
853853
854854 for (auto it = node.begin (); it != node.end (); ++it)
855- rhs[it->first .as <std::string >()] = it->second .as <bool >();
855+ rhs[it->first .as <T >()] = it->second .as <A >();
856856
857857 return true ;
858858 }
You can’t perform that action at this time.
0 commit comments