Skip to content

Commit 31a06e8

Browse files
authored
Merge pull request #4354 from romainbrenguier/improvement/bdd_expr_cast
Use narrow instead of numeric_cast on std::size_t
2 parents 5973f10 + c50ee19 commit 31a06e8

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/solvers/prop/bdd_expr.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,11 @@ Author: Michael Tautschnig, [email protected]
1111

1212
#include "bdd_expr.h"
1313

14-
#include <util/arith_tools.h>
1514
#include <util/expr_util.h>
1615
#include <util/format_expr.h>
1716
#include <util/invariant.h>
1817
#include <util/std_expr.h>
1918

20-
#include <sstream>
21-
2219
bddt bdd_exprt::from_expr_rec(const exprt &expr)
2320
{
2421
PRECONDITION(expr.type().id() == ID_bool);
@@ -112,7 +109,7 @@ exprt bdd_exprt::as_expr(
112109
return true_exprt();
113110
}
114111

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

0 commit comments

Comments
 (0)