Skip to content

Commit d2990e2

Browse files
committed
use usize to suppress the data loss warnings
Signed-off-by: Lev Nachmanson <[email protected]>
1 parent f544dd4 commit d2990e2

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/nlsat/nlsat_simplify.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ namespace nlsat {
6666
polynomial_ref p(m_pm);
6767
ptr_buffer<poly> ps;
6868
buffer<bool> is_even;
69-
unsigned num_atoms = m_atoms.size();
69+
unsigned num_atoms = usize(m_atoms);
7070
for (unsigned j = 0; j < num_atoms; ++j) {
7171
atom* a1 = m_atoms[j];
7272
if (a1 && a1->is_ineq_atom()) {

src/nlsat/nlsat_solver.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2616,7 +2616,7 @@ namespace nlsat {
26162616

26172617
bool check_satisfied() {
26182618
TRACE(nlsat, tout << "bk: b" << m_bk << ", xk: x" << m_xk << "\n"; if (m_xk != null_var) { m_display_var(tout, m_xk); tout << "\n"; });
2619-
unsigned num = m_atoms.size();
2619+
unsigned num = usize(m_atoms);
26202620
if (m_bk != null_bool_var)
26212621
num = m_bk;
26222622
for (bool_var b = 0; b < num; b++) {
@@ -3273,7 +3273,7 @@ namespace nlsat {
32733273
}
32743274

32753275
std::ostream& display_bool_assignment(std::ostream & out, bool eval_atoms = false) const {
3276-
unsigned sz = m_atoms.size();
3276+
unsigned sz = usize(m_atoms);
32773277
if (!eval_atoms) {
32783278
for (bool_var b = 0; b < sz; b++) {
32793279
if (m_bvalues[b] == l_undef)
@@ -4011,7 +4011,7 @@ namespace nlsat {
40114011
}
40124012

40134013
std::ostream& display_smt2_bool_decls(std::ostream & out) const {
4014-
unsigned sz = m_atoms.size();
4014+
unsigned sz = usize(m_atoms);
40154015
for (unsigned i = 0; i < sz; i++) {
40164016
if (m_atoms[i] == nullptr)
40174017
out << "(declare-fun b" << i << " () Bool)\n";

0 commit comments

Comments
 (0)