Skip to content

Commit a622d44

Browse files
author
Thomas Kiley
authored
Merge pull request #4281 from thk123/refactor/tidy-over-complicated-if
Refactor: simplify an if statement
2 parents 05af336 + 86b5e11 commit a622d44

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

src/solvers/flattening/pointer_logic.cpp

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,11 @@ Author: Daniel Kroening, [email protected]
2323

2424
bool pointer_logict::is_dynamic_object(const exprt &expr) const
2525
{
26-
if(expr.type().get_bool(ID_C_dynamic))
27-
return true;
28-
29-
if(expr.id()==ID_symbol)
30-
if(has_prefix(
31-
id2string(to_symbol_expr(expr).get_identifier()),
32-
SYMEX_DYNAMIC_PREFIX))
33-
return true;
34-
35-
return false;
26+
return expr.type().get_bool(ID_C_dynamic) ||
27+
(expr.id() == ID_symbol &&
28+
has_prefix(
29+
id2string(to_symbol_expr(expr).get_identifier()),
30+
SYMEX_DYNAMIC_PREFIX));
3631
}
3732

3833
void pointer_logict::get_dynamic_objects(std::vector<std::size_t> &o) const

0 commit comments

Comments
 (0)