Skip to content

Commit fe277a2

Browse files
committed
Simplify array_abstract_objectt::write_index
1 parent e695bbe commit fe277a2

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/analyses/variable-sensitivity/array_abstract_object.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,11 @@ abstract_object_pointert array_abstract_objectt::write_index(
8282
// havoc and the default should derive from this.
8383
if(is_top() || is_bottom())
8484
{
85-
return std::dynamic_pointer_cast<const array_abstract_objectt>(clone());
85+
return shared_from_this();
8686
}
8787
else
8888
{
89-
return sharing_ptrt<array_abstract_objectt>(
90-
new array_abstract_objectt(type(), true, false));
89+
return std::make_shared<array_abstract_objectt>(type(), true, false);
9190
}
9291
}
9392

0 commit comments

Comments
 (0)