Skip to content

Commit c9d0548

Browse files
Use narrow instead of numeric_cast on std::size_t
numeric_cast implicitely converts the std::size_t to an mp_integer, before converting it back to an integral value and checking for bound which is less efficient than narrow.
1 parent d91b397 commit c9d0548

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/solvers/prop/bdd_expr.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ exprt bdd_exprt::as_expr(
112112
return true_exprt();
113113
}
114114

115-
auto index = numeric_cast_v<std::size_t>(r.index());
115+
auto index = narrow<std::size_t>(r.index());
116116
INVARIANT(index < node_map.size(), "Index should be in node_map");
117117
const exprt &n_expr = node_map[index];
118118

0 commit comments

Comments
 (0)