From 92cfc242d25727ffeb1bef5e60731793b85a8731 Mon Sep 17 00:00:00 2001 From: Nikolaj Bjorner Date: Tue, 19 May 2015 08:15:59 -0700 Subject: [PATCH] cast variables to avoid compiler warning on signed/unsigned comparison Signed-off-by: Nikolaj Bjorner --- src/smt/theory_wmaxsat.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/smt/theory_wmaxsat.cpp b/src/smt/theory_wmaxsat.cpp index 0c9e64e93..9ed944d2c 100644 --- a/src/smt/theory_wmaxsat.cpp +++ b/src/smt/theory_wmaxsat.cpp @@ -55,9 +55,8 @@ void theory_wmaxsat::get_assignment(svector& result) { } else { std::sort(m_cost_save.begin(), m_cost_save.end()); - unsigned j = 0; - for (theory_var i = 0; i < m_vars.size(); ++i) { - if (j < m_cost_save.size() && m_cost_save[j] == i) { + for (unsigned i = 0,j = 0; i < m_vars.size(); ++i) { + if (j < m_cost_save.size() && m_cost_save[j] == static_cast(i)) { result.push_back(false); ++j; }