Skip to content

Commit 205ec36

Browse files
Merge pull request #4356 from romainbrenguier/feature/bdd-error
Correct type of bdd_cuddt::indext
2 parents 31a06e8 + 52ba6c9 commit 205ec36

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/solvers/bdd/bdd_cudd.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ Author: Romain Brenguier, [email protected]
1717

1818
#include <cplusplus/cuddObj.hh>
1919

20+
#include <util/narrow.h>
21+
2022
class bdd_managert;
2123
class bddt;
2224
class bdd_nodet;
@@ -36,7 +38,7 @@ class bdd_nodet
3638
}
3739

3840
/// Type of indexes of Boolean variables
39-
using indext = int;
41+
using indext = unsigned int;
4042

4143
/// Label on the node, corresponds to the index of a Boolean variable
4244
indext index() const
@@ -152,7 +154,7 @@ class bdd_managert
152154

153155
bddt bdd_variable(bdd_nodet::indext index)
154156
{
155-
return bddt(cudd.bddVar(index));
157+
return bddt(cudd.bddVar(narrow_cast<int>(index)));
156158
}
157159

158160
bdd_nodet bdd_node(const bddt &bdd) const

0 commit comments

Comments
 (0)