From 871c551a6d76955982ca8aa7ab8e0e32cadc167f Mon Sep 17 00:00:00 2001 From: Romain Brenguier Date: Fri, 8 Mar 2019 17:49:19 +0000 Subject: [PATCH 1/2] Correct type of bdd_cuddt::indext This was causing errors when compiling with clang -Werror -Wsign-conversion --- src/solvers/bdd/bdd_cudd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/solvers/bdd/bdd_cudd.h b/src/solvers/bdd/bdd_cudd.h index f158255462e..b4eeafc5da2 100644 --- a/src/solvers/bdd/bdd_cudd.h +++ b/src/solvers/bdd/bdd_cudd.h @@ -36,7 +36,7 @@ class bdd_nodet } /// Type of indexes of Boolean variables - using indext = int; + using indext = unsigned int; /// Label on the node, corresponds to the index of a Boolean variable indext index() const From 52ba6c921e9e615c5cab0ababf201bcc01d2ea6a Mon Sep 17 00:00:00 2001 From: Romain Brenguier Date: Fri, 8 Mar 2019 21:46:40 +0000 Subject: [PATCH 2/2] Correct argument type of cudd.bddVar The type of cudd.bddVar differs from cuddNodeReadIndex, so we need a conversion between the two. --- src/solvers/bdd/bdd_cudd.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/solvers/bdd/bdd_cudd.h b/src/solvers/bdd/bdd_cudd.h index b4eeafc5da2..e2bf5f91b37 100644 --- a/src/solvers/bdd/bdd_cudd.h +++ b/src/solvers/bdd/bdd_cudd.h @@ -17,6 +17,8 @@ Author: Romain Brenguier, romain.brenguier@diffblue.com #include +#include + class bdd_managert; class bddt; class bdd_nodet; @@ -152,7 +154,7 @@ class bdd_managert bddt bdd_variable(bdd_nodet::indext index) { - return bddt(cudd.bddVar(index)); + return bddt(cudd.bddVar(narrow_cast(index))); } bdd_nodet bdd_node(const bddt &bdd) const