Skip to content

Commit d5ea17b

Browse files
committed
stop ordering ports in TreeNodesModel
1 parent b67e5b5 commit d5ea17b

File tree

1 file changed

+1
-25
lines changed

1 file changed

+1
-25
lines changed

src/xml_parsing.cpp

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -850,32 +850,8 @@ void addNodeModelToXML(const TreeNodeManifest& model,
850850
XMLElement* element = doc.NewElement(toStr(model.type).c_str());
851851
element->SetAttribute("ID", model.registration_ID.c_str());
852852

853-
std::vector<std::string> ordered_ports;
854-
PortDirection const directions[3] = {PortDirection::INPUT,
855-
PortDirection::OUTPUT,
856-
PortDirection::INOUT};
857-
for (PortDirection direction: directions)
853+
for (const auto& [port_name, port_info] : model.ports)
858854
{
859-
std::set<std::string> port_names;
860-
for (auto& port : model.ports)
861-
{
862-
const auto& port_name = port.first;
863-
const auto& port_info = port.second;
864-
if (port_info.direction() == direction)
865-
{
866-
port_names.insert(port_name);
867-
}
868-
}
869-
for (auto& port : port_names)
870-
{
871-
ordered_ports.push_back(port);
872-
}
873-
}
874-
875-
for (const auto& port_name : ordered_ports)
876-
{
877-
const auto& port_info = model.ports.at(port_name);
878-
879855
XMLElement* port_element = nullptr;
880856
switch (port_info.direction())
881857
{

0 commit comments

Comments
 (0)