3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-05-08 00:05:46 +00:00

Prefer using empty rather than size comparisons.

This commit is contained in:
Bruce Mitchener 2018-11-27 21:42:04 +07:00
parent a83097d5cc
commit e570940662
56 changed files with 104 additions and 104 deletions

View file

@ -137,7 +137,7 @@ ATOMIC_CMD(get_assignment_cmd, "get-assignment", "retrieve assignment", {
symbol const & name = kv.m_key;
macro_decls const & _m = kv.m_value;
for (auto md : _m) {
if (md.m_domain.size() == 0 && ctx.m().is_bool(md.m_body)) {
if (md.m_domain.empty() && ctx.m().is_bool(md.m_body)) {
model::scoped_model_completion _scm(*m, true);
expr_ref val = (*m)(md.m_body);
if (ctx.m().is_true(val) || ctx.m().is_false(val)) {

View file

@ -2108,7 +2108,7 @@ void cmd_context::dt_eh::operator()(sort * dt, pdecl* pd) {
m_owner.insert(a);
}
}
if (m_owner.m_scopes.size() > 0) {
if (!m_owner.m_scopes.empty()) {
m_owner.pm().inc_ref(pd);
m_owner.m_psort_inst_stack.push_back(pd);
}

View file

@ -224,7 +224,7 @@ public:
ctx.display_sat_result(r);
result->set_status(r);
if (r == l_undef) {
if (reason_unknown != "") {
if (!reason_unknown.empty()) {
result->m_unknown = reason_unknown;
// ctx.diagnostic_stream() << "\"" << escaped(reason_unknown.c_str(), true) << "\"" << std::endl;
}