File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
include/behaviortree_cpp/flatbuffers Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -80,13 +80,15 @@ inline void CreateFlatbuffersBehaviorTree(flatbuffers::FlatBufferBuilder& builde
8080 children_uid.push_back (child->UID ());
8181 }
8282
83+ // Const cast to ensure public access to config() overload
84+ const auto & node_config = const_cast <BT::TreeNode const &>(*node).config ();
8385 std::vector<flatbuffers::Offset<Serialization::PortConfig>> ports;
84- for (const auto & it : node-> config () .input_ports )
86+ for (const auto & it : node_config .input_ports )
8587 {
8688 ports.push_back (Serialization::CreatePortConfigDirect (builder, it.first .c_str (),
8789 it.second .c_str ()));
8890 }
89- for (const auto & it : node-> config () .output_ports )
91+ for (const auto & it : node_config .output_ports )
9092 {
9193 ports.push_back (Serialization::CreatePortConfigDirect (builder, it.first .c_str (),
9294 it.second .c_str ()));
You can’t perform that action at this time.
0 commit comments