diff --git a/src/opt/hitting_sets.cpp b/src/opt/hitting_sets.cpp index 37b800428..8c10d3640 100644 --- a/src/opt/hitting_sets.cpp +++ b/src/opt/hitting_sets.cpp @@ -122,7 +122,7 @@ namespace opt { bool m_enable_simplex; struct compare_scores { imp* m_imp; - compare_scores(imp* i):m_imp(i) {} + compare_scores():m_imp(0) {} bool operator()(int v1, int v2) const { return m_imp->m_scored_weights[v1] > m_imp->m_scored_weights[v2]; } @@ -154,10 +154,10 @@ namespace opt { m_scope_lvl(0), m_conflict_j(justification(justification::AXIOM)), m_inconsistent(false), - m_compare_scores(this), + m_compare_scores(), m_heap(0, m_compare_scores) { m_enable_simplex = true; - + m_compare_scores.m_imp = this; } ~imp() { for (unsigned i = 0; i < m_T.size(); ++i) { diff --git a/src/util/mpff.cpp b/src/util/mpff.cpp index 14c67e7c0..e5d3cf24c 100644 --- a/src/util/mpff.cpp +++ b/src/util/mpff.cpp @@ -255,7 +255,7 @@ void mpff_manager::set(mpff & n, int64 v) { } else { if (v < 0) { - set(n, -static_cast(v)); + set(n, 1 + static_cast(-(1+v))); n.m_sign = 1; } else {