@@ -20,7 +20,7 @@ void t_rr_graph_storage::emplace_back_edge(RRNodeId src, RRNodeId dest, short ed
20
20
edge_src_node_.emplace_back (src);
21
21
edge_dest_node_.emplace_back (dest);
22
22
edge_switch_.emplace_back (edge_switch);
23
- edge_switch_offset_inf_.emplace_back (RRSwitchOffsetInfoId::INVALID ());
23
+ edge_switch_offset_inf_.emplace_back (remapped ? (RRSwitchOffsetInfoId)edge_switch : RRSwitchOffsetInfoId::INVALID ());
24
24
edge_remapped_.emplace_back (remapped);
25
25
}
26
26
@@ -101,7 +101,7 @@ struct edge_swapper {
101
101
storage_->edge_src_node_ [RREdgeId (idx_)] = RRNodeId (edge.from_node );
102
102
storage_->edge_dest_node_ [RREdgeId (idx_)] = RRNodeId (edge.to_node );
103
103
storage_->edge_switch_ [RREdgeId (idx_)] = edge.switch_type ;
104
- storage_->edge_switch_offset_inf_ [RREdgeId (idx_)] = RRSwitchOffsetInfoId::INVALID ();
104
+ storage_->edge_switch_offset_inf_ [RREdgeId (idx_)] = edge. remapped ? (RRSwitchOffsetInfoId)edge. switch_type : RRSwitchOffsetInfoId::INVALID ();
105
105
storage_->edge_remapped_ [RREdgeId (idx_)] = edge.remapped ;
106
106
return *this ;
107
107
}
@@ -167,7 +167,7 @@ class edge_sort_iterator {
167
167
// it needs to "act" like a pointer. One thing that it should do is that a
168
168
// const variable of this type should be de-referenceable. Therefore, this
169
169
// method should be const method; however, this requires modifying the class
170
- // and may yield worst performance. For now the std::stable_sort allows this
170
+ // and may yield worse performance. For now the std::stable_sort allows this
171
171
// but in the future it may not. If this breaks, this is why.
172
172
// See issue #2517 and PR #2522
173
173
edge_swapper& operator *() {
0 commit comments