File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed
Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -1615,18 +1615,22 @@ const char* dbNetwork::pathName(const Net* net) const
16151615 if (parent_module == block_->getTopModule ()) {
16161616 return tmpStringCopy (modnet_name.c_str ());
16171617 }
1618- // accumulate a hierachical name, includes top level name
1619- std::string accumulated_path_name;
1618+
1619+ // Make a full hierarchical name
1620+ fmt::memory_buffer full_path_buf;
16201621 std::vector<dbModule*> parent_hierarchy;
16211622 hierarchy_editor_->getParentHierarchy (parent_module, parent_hierarchy);
16221623 std::reverse (parent_hierarchy.begin (), parent_hierarchy.end ());
1624+ auto back_inserter = std::back_inserter (full_path_buf);
16231625 for (auto db_mod : parent_hierarchy) {
1624- std::string module_name = db_mod->getName ();
1625- accumulated_path_name.append (module_name);
1626- accumulated_path_name.append (" /" );
1626+ fmt::format_to (back_inserter,
1627+ " {}{}" ,
1628+ db_mod->getName (),
1629+ block_->getHierarchyDelimiter ());
16271630 }
1628- accumulated_path_name.append (modnet_name);
1629- return tmpStringCopy (accumulated_path_name.c_str ());
1631+ full_path_buf.append (modnet_name);
1632+ full_path_buf.push_back (' \0 ' );
1633+ return tmpStringCopy (full_path_buf.data ());
16301634 }
16311635 return nullptr ;
16321636}
You can’t perform that action at this time.
0 commit comments