summarylogtreecommitdiffstats
path: root/friend-function.patch
blob: 4261ee1120aa2f67ee1c0df29809ce5b0da888b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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