Skip to content

Commit 9e87fb4

Browse files
committed
[lib] fixed the bug on rr graph io. Should use temp_string_
1 parent 616629d commit 9e87fb4

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

libs/librrgraph/src/io/gen/rr_graph_uxsdcxx.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4020,7 +4020,7 @@ inline void write_node(T &in, std::ostream &os, Context &context){
40204020
auto child_context = in.get_node_loc(context);
40214021
os << "<loc";
40224022
os << " layer=\"" << in.get_node_loc_layer(child_context) << "\"";
4023-
os << " ptc=\"" << std::string(in.get_node_loc_ptc(child_context)) << "\"";
4023+
os << " ptc=\"" << in.get_node_loc_ptc(child_context) << "\"";
40244024
if((bool)in.get_node_loc_side(child_context))
40254025
os << " side=\"" << lookup_loc_side[(int)in.get_node_loc_side(child_context)] << "\"";
40264026
if((bool)in.get_node_loc_twist(child_context))

libs/librrgraph/src/io/rr_graph_uxsdcxx_serializer.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -713,7 +713,8 @@ class RrGraphSerializer final : public uxsd::RrGraphBase<RrGraphContextTypes> {
713713
}
714714

715715
inline const char* get_node_loc_ptc(const t_rr_node& node) final {
716-
return rr_graph_builder_->node_ptc_nums_to_string(node.id()).c_str();
716+
temp_string_ = rr_graph_builder_->node_ptc_nums_to_string(node.id());
717+
return temp_string_.c_str();
717718
}
718719
inline int get_node_loc_layer(const t_rr_node& node) final {
719720
return rr_graph_->node_layer(node.id());

0 commit comments

Comments
 (0)