@@ -2632,12 +2632,12 @@ static void process_block_type_locs(t_grid_def& grid_def,
26322632 const pugiutil::loc_data& loc_data) {
26332633 // Process all the block location specifications
26342634 for (pugi::xml_node loc_spec_tag : layout_block_type_tag.children ()) {
2635- const char * loc_type = loc_spec_tag.name ();
2635+ std::string_view loc_type = loc_spec_tag.name ();
26362636
26372637 // There are multiple attributes that are shared by every other tag that interposer
26382638 // tags do not have. For this reason we check if loc_spec_tag is an interposer tag
26392639 // and switch code paths if it is.
2640- if (loc_type == std::string ( " interposer_cut" ) ) {
2640+ if (loc_type == " interposer_cut" ) {
26412641 if (grid_def.grid_type == e_grid_def_type::AUTO) {
26422642 archfpga_throw (loc_data.filename_c_str (), loc_data.line (loc_spec_tag), " Interposers are not currently supported for auto sized devices." );
26432643 }
@@ -2658,7 +2658,7 @@ static void process_block_type_locs(t_grid_def& grid_def,
26582658 int priority = get_attribute (loc_spec_tag, " priority" , loc_data).as_int ();
26592659 t_metadata_dict meta = process_meta_data (strings, loc_spec_tag, loc_data);
26602660
2661- if (loc_type == std::string ( " perimeter" ) ) {
2661+ if (loc_type == " perimeter" ) {
26622662 expect_only_attributes (loc_spec_tag, {" type" , " priority" }, loc_data);
26632663
26642664 // The edges
@@ -2697,7 +2697,7 @@ static void process_block_type_locs(t_grid_def& grid_def,
26972697 grid_def.layers .at (die_number).loc_defs .emplace_back (std::move (top_edge));
26982698 grid_def.layers .at (die_number).loc_defs .emplace_back (std::move (bottom_edge));
26992699
2700- } else if (loc_type == std::string ( " corners" ) ) {
2700+ } else if (loc_type == " corners" ) {
27012701 expect_only_attributes (loc_spec_tag, {" type" , " priority" }, loc_data);
27022702
27032703 // The corners
@@ -2736,7 +2736,7 @@ static void process_block_type_locs(t_grid_def& grid_def,
27362736 grid_def.layers .at (die_number).loc_defs .emplace_back (std::move (bottom_right));
27372737 grid_def.layers .at (die_number).loc_defs .emplace_back (std::move (top_right));
27382738
2739- } else if (loc_type == std::string ( " fill" ) ) {
2739+ } else if (loc_type == " fill" ) {
27402740 expect_only_attributes (loc_spec_tag, {" type" , " priority" }, loc_data);
27412741
27422742 t_grid_loc_def fill (type_name, priority);
@@ -2750,7 +2750,7 @@ static void process_block_type_locs(t_grid_def& grid_def,
27502750
27512751 grid_def.layers .at (die_number).loc_defs .emplace_back (std::move (fill));
27522752
2753- } else if (loc_type == std::string ( " single" ) ) {
2753+ } else if (loc_type == " single" ) {
27542754 expect_only_attributes (loc_spec_tag, {" type" , " priority" , " x" , " y" }, loc_data);
27552755
27562756 t_grid_loc_def single (type_name, priority);
@@ -2764,7 +2764,7 @@ static void process_block_type_locs(t_grid_def& grid_def,
27642764
27652765 grid_def.layers .at (die_number).loc_defs .emplace_back (std::move (single));
27662766
2767- } else if (loc_type == std::string ( " col" ) ) {
2767+ } else if (loc_type == " col" ) {
27682768 expect_only_attributes (loc_spec_tag, {" type" , " priority" , " startx" , " repeatx" , " starty" , " incry" }, loc_data);
27692769
27702770 t_grid_loc_def col (type_name, priority);
@@ -2794,7 +2794,7 @@ static void process_block_type_locs(t_grid_def& grid_def,
27942794
27952795 grid_def.layers .at (die_number).loc_defs .emplace_back (std::move (col));
27962796
2797- } else if (loc_type == std::string ( " row" ) ) {
2797+ } else if (loc_type == " row" ) {
27982798 expect_only_attributes (loc_spec_tag, {" type" , " priority" , " starty" , " repeaty" , " startx" , " incrx" }, loc_data);
27992799
28002800 t_grid_loc_def row (type_name, priority);
@@ -2823,7 +2823,7 @@ static void process_block_type_locs(t_grid_def& grid_def,
28232823 row.meta = row.owned_meta .get ();
28242824
28252825 grid_def.layers .at (die_number).loc_defs .emplace_back (std::move (row));
2826- } else if (loc_type == std::string ( " region" ) ) {
2826+ } else if (loc_type == " region" ) {
28272827 expect_only_attributes (loc_spec_tag,
28282828 {" type" , " priority" ,
28292829 " startx" , " endx" , " repeatx" , " incrx" ,
@@ -4094,12 +4094,12 @@ static void process_bend(pugi::xml_node node, t_segment_inf& segment, const int
40944094 std::vector<int >& part_len = segment.part_len ;
40954095 bool & is_bend = segment.is_bend ;
40964096
4097- std::string tmp = std::string ( get_attribute (node, " type" , loc_data).value () );
4097+ std::string tmp = get_attribute (node, " type" , loc_data).value ();
40984098 if (tmp == " pattern" ) {
40994099 int i = 0 ;
41004100
4101- /* Get the content string */
4102- std::string content = std::string ( node.child_value () );
4101+ // Get the content string
4102+ std::string content = node.child_value ();
41034103 for (char c : content) {
41044104 switch (c) {
41054105 case ' ' :
0 commit comments