summarylogtreecommitdiffstats
path: root/friend-function.patch
diff options
context:
space:
mode:
authorKyle Keen2015-06-23 15:17:59 -0400
committerKyle Keen2015-06-23 15:17:59 -0400
commitf981aa4c5a26a4585059e8d98b24c99d9e7e5ea8 (patch)
tree83556f1e3fc49387fe4576c0ac8c9db661f777e8 /friend-function.patch
downloadaur-f981aa4c5a26a4585059e8d98b24c99d9e7e5ea8.tar.gz
Initial import
Diffstat (limited to 'friend-function.patch')
-rw-r--r--friend-function.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/friend-function.patch b/friend-function.patch
new file mode 100644
index 000000000000..4261ee1120aa
--- /dev/null
+++ b/friend-function.patch
@@ -0,0 +1,37 @@
+diff --git a/packages/swi-minisat2/C/Solver.C b/packages/swi-minisat2/C/Solver.C
+index 2de3e6d..1bcdbff 100644
+--- a/packages/swi-minisat2/C/Solver.C
++++ b/packages/swi-minisat2/C/Solver.C
+@@ -120,7 +120,7 @@ bool Solver::addClause(vec<Lit>& ps)
+ uncheckedEnqueue(ps[0]);
+ return ok = (propagate() == NULL);
+ }else{
+- Clause* c = Clause_new(ps, false);
++ Clause* c = Clause::Clause_new(ps, false);
+ clauses.push(c);
+ attachClause(*c);
+ }
+@@ -599,7 +599,7 @@ lbool Solver::search(int nof_conflicts, int nof_learnts)
+ if (learnt_clause.size() == 1){
+ uncheckedEnqueue(learnt_clause[0]);
+ }else{
+- Clause* c = Clause_new(learnt_clause, true);
++ Clause* c = Clause::Clause_new(learnt_clause, true);
+ learnts.push(c);
+ attachClause(*c);
+ claBumpActivity(*c);
+diff --git a/packages/swi-minisat2/C/SolverTypes.h b/packages/swi-minisat2/C/SolverTypes.h
+index 47e3023..919b60b 100644
+--- a/packages/swi-minisat2/C/SolverTypes.h
++++ b/packages/swi-minisat2/C/SolverTypes.h
+@@ -119,7 +119,7 @@ public:
+
+ // -- use this function instead:
+ template<class V>
+- friend Clause* Clause_new(const V& ps, bool learnt = false) {
++ static Clause* Clause_new(const V& ps, bool learnt = false) {
+ assert(sizeof(Lit) == sizeof(uint32_t));
+ assert(sizeof(float) == sizeof(uint32_t));
+ void* mem = malloc(sizeof(Clause) + sizeof(uint32_t)*(ps.size()));
+--
+1.9.3