From 46a695df84232ac65757b148c641b361c168df30 Mon Sep 17 00:00:00 2001 From: Nils Husung Date: Wed, 1 May 2024 16:00:46 +0200 Subject: [PATCH 1/4] Forward `negout` to `Cal_BddSize()` --- src/calObj.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calObj.hh b/src/calObj.hh index d34f8d8..c4a48f3 100644 --- a/src/calObj.hh +++ b/src/calObj.hh @@ -292,7 +292,7 @@ public: /// negative-output pointers (complement edges). ////////////////////////////////////////////////////////////////////////////// unsigned long Size(bool negout = true) const - { return Cal_BddSize(this->_bddManager, this->_bdd, 0); } + { return Cal_BddSize(this->_bddManager, this->_bdd, negout); } ////////////////////////////////////////////////////////////////////////////// /// \copybrief Cal_BddSatisfyingFraction From 3f42df7823f73a2fae1d87942430c035a97ef49f Mon Sep 17 00:00:00 2001 From: Nils Husung Date: Wed, 1 May 2024 16:01:47 +0200 Subject: [PATCH 2/4] Allow copy-elision --- src/calObj.hh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/calObj.hh b/src/calObj.hh index c4a48f3..97f1744 100644 --- a/src/calObj.hh +++ b/src/calObj.hh @@ -609,7 +609,7 @@ protected: out.push_back(Cal_BddNull(bddManager)); - return std::move(out); + return out; } ////////////////////////////////////////////////////////////////////////////// @@ -628,7 +628,7 @@ protected: res.push_back(BDD(bddManager, bddArray[i])); } - return std::move(res); + return res; } /// \endcond From 553b2758813b251461e8d2c13f48294c2200b449 Mon Sep 17 00:00:00 2001 From: Nils Husung Date: Wed, 1 May 2024 16:03:39 +0200 Subject: [PATCH 3/4] Fix clangd error messages on includes --- src/calObj.hh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/calObj.hh b/src/calObj.hh index 97f1744..7f232a6 100644 --- a/src/calObj.hh +++ b/src/calObj.hh @@ -40,8 +40,8 @@ #define _CALOBJ extern "C" { -#include -#include +#include "cal.h" +#include "calInt.h" } #include From a517c3978319f473cc273892101c1efe0e09034b Mon Sep 17 00:00:00 2001 From: Nils Husung Date: Wed, 1 May 2024 16:10:07 +0200 Subject: [PATCH 4/4] Fix build with clang --- src/calObj.hh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/calObj.hh b/src/calObj.hh index 7f232a6..8306148 100644 --- a/src/calObj.hh +++ b/src/calObj.hh @@ -1201,7 +1201,7 @@ public: std::vector c_arg = BDD::C_Bdd_vector(this->_bddManager, std::move(begin), std::move(end)); - const BDD res = Cal_BddMultiwayAnd(this->_bddManager, c_arg.data()); + const BDD res(this->_bddManager, Cal_BddMultiwayAnd(this->_bddManager, c_arg.data())); BDD::Free(this->_bddManager, c_arg.begin(), c_arg.end()); @@ -1242,7 +1242,7 @@ public: std::vector c_arg = BDD::C_Bdd_vector(this->_bddManager, std::move(begin), std::move(end)); - const BDD res = Cal_BddMultiwayOr(this->_bddManager, c_arg.data()); + const BDD res(this->_bddManager, Cal_BddMultiwayOr(this->_bddManager, c_arg.data())); BDD::Free(this->_bddManager, c_arg.begin(), c_arg.end()); @@ -1283,7 +1283,7 @@ public: std::vector c_arg = BDD::C_Bdd_vector(this->_bddManager, std::move(begin), std::move(end)); - const BDD res = Cal_BddMultiwayXor(this->_bddManager, c_arg.data()); + const BDD res(this->_bddManager, Cal_BddMultiwayXor(this->_bddManager, c_arg.data())); BDD::Free(this->_bddManager, c_arg.begin(), c_arg.end());