mirror of
https://github.com/Z3Prover/z3
synced 2025-04-27 02:45:51 +00:00
Prefer using empty rather than size comparisons.
This commit is contained in:
parent
a83097d5cc
commit
e570940662
56 changed files with 104 additions and 104 deletions
|
@ -399,12 +399,12 @@ class smt_printer {
|
|||
pp_marked_expr(n->get_arg(0));
|
||||
m_out << ") (_ bv1 1))";
|
||||
}
|
||||
else if (m_manager.is_label(n, pos, names) && names.size() >= 1) {
|
||||
else if (m_manager.is_label(n, pos, names) && !names.empty()) {
|
||||
m_out << "(! ";
|
||||
pp_marked_expr(n->get_arg(0));
|
||||
m_out << (pos?":lblpos":":lblneg") << " " << m_renaming.get_symbol(names[0], false) << ")";
|
||||
}
|
||||
else if (m_manager.is_label_lit(n, names) && names.size() >= 1) {
|
||||
else if (m_manager.is_label_lit(n, names) && !names.empty()) {
|
||||
m_out << "(! true :lblpos " << m_renaming.get_symbol(names[0], false) << ")";
|
||||
}
|
||||
else if (num_args == 0) {
|
||||
|
@ -952,7 +952,7 @@ void ast_smt_pp::display_smt2(std::ostream& strm, expr* n) {
|
|||
if (m_logic != symbol::null && m_logic != symbol("")) {
|
||||
strm << "(set-logic " << m_logic << ")\n";
|
||||
}
|
||||
if (m_attributes.size() > 0) {
|
||||
if (!m_attributes.empty()) {
|
||||
strm << "; " << m_attributes.c_str();
|
||||
}
|
||||
|
||||
|
|
|
@ -436,7 +436,7 @@ struct expr2polynomial::imp {
|
|||
margs.push_back(t);
|
||||
}
|
||||
}
|
||||
if (margs.size() == 0) {
|
||||
if (margs.empty()) {
|
||||
args.push_back(m_autil.mk_numeral(rational(1), is_int));
|
||||
}
|
||||
else if (margs.size() == 1) {
|
||||
|
@ -447,7 +447,7 @@ struct expr2polynomial::imp {
|
|||
}
|
||||
}
|
||||
|
||||
if (args.size() == 0) {
|
||||
if (args.empty()) {
|
||||
r = m_autil.mk_numeral(rational(0), is_int);
|
||||
}
|
||||
else if (args.size() == 1) {
|
||||
|
|
|
@ -238,7 +238,7 @@ class reduce_hypotheses {
|
|||
{ args.push_back(fact); }
|
||||
|
||||
|
||||
if (args.size() == 0) { return pf; }
|
||||
if (args.empty()) { return pf; }
|
||||
else if (args.size() == 1) {
|
||||
lemma = args.get(0);
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue