3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-10-09 01:11:55 +00:00

Merge pull request #1972 from waywardmonkeys/use-vector-empty

Prefer using empty rather than size comparisons.
This commit is contained in:
Nikolaj Bjorner 2018-11-27 10:39:34 -08:00 committed by GitHub
commit 5df29daa35
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
56 changed files with 104 additions and 104 deletions

View file

@ -3576,18 +3576,18 @@ void theory_seq::apply_sort_cnstr(enode* n, sort* s) {
}
void theory_seq::display(std::ostream & out) const {
if (m_eqs.size() == 0 &&
m_nqs.size() == 0 &&
if (m_eqs.empty() &&
m_nqs.empty() &&
m_rep.empty() &&
m_exclude.empty()) {
return;
}
out << "Theory seq\n";
if (m_eqs.size() > 0) {
if (!m_eqs.empty()) {
out << "Equations:\n";
display_equations(out);
}
if (m_nqs.size() > 0) {
if (!m_nqs.empty()) {
display_disequations(out);
}
if (!m_re2aut.empty()) {
@ -3661,7 +3661,7 @@ std::ostream& theory_seq::display_disequation(std::ostream& out, ne const& e) co
for (literal lit : e.lits()) {
out << lit << " ";
}
if (e.lits().size() > 0) {
if (!e.lits().empty()) {
out << "\n";
}
for (unsigned j = 0; j < e.ls().size(); ++j) {