Skip to content

Commit a7cc337

Browse files
author
Thomas Kiley
committed
Remove duplicated code
lhs_object and symbol were declare and initalized (to the same value) twice. Looks like a copy-paste error.
1 parent 388b547 commit a7cc337

File tree

1 file changed

+9
-18
lines changed

1 file changed

+9
-18
lines changed

src/goto-programs/xml_goto_trace.cpp

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -70,30 +70,21 @@ void convert(
7070
xml_assignment.new_element().swap(xml_location);
7171

7272
{
73-
auto lhs_object = step.get_lhs_object();
74-
7573
const symbolt *symbol;
7674

7775
if(
7876
lhs_object.has_value() &&
7977
!ns.lookup(lhs_object->get_identifier(), symbol))
8078
{
81-
const symbolt *symbol;
82-
83-
if(
84-
lhs_object.has_value() &&
85-
!ns.lookup(lhs_object->get_identifier(), symbol))
86-
{
87-
std::string type_string = from_type(ns, symbol->name, symbol->type);
88-
89-
xml_assignment.set_attribute("mode", id2string(symbol->mode));
90-
xml_assignment.set_attribute("identifier", id2string(symbol->name));
91-
xml_assignment.set_attribute(
92-
"base_name", id2string(symbol->base_name));
93-
xml_assignment.set_attribute(
94-
"display_name", id2string(symbol->display_name()));
95-
xml_assignment.new_element("type").data = type_string;
96-
}
79+
std::string type_string = from_type(ns, symbol->name, symbol->type);
80+
81+
xml_assignment.set_attribute("mode", id2string(symbol->mode));
82+
xml_assignment.set_attribute("identifier", id2string(symbol->name));
83+
xml_assignment.set_attribute(
84+
"base_name", id2string(symbol->base_name));
85+
xml_assignment.set_attribute(
86+
"display_name", id2string(symbol->display_name()));
87+
xml_assignment.new_element("type").data = type_string;
9788
}
9889
}
9990

0 commit comments

Comments
 (0)