3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-29 20:05:51 +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

@ -220,7 +220,7 @@ class mps_reader {
*m_message_stream << "cannot read from file" << std::endl;
}
m_line_number++;
if (m_line.size() != 0 && m_line[0] != '*' && !all_white_space())
if (!m_line.empty() && m_line[0] != '*' && !all_white_space())
break;
}
}
@ -514,7 +514,7 @@ class mps_reader {
lp_assert(m_line.size() >= 14);
vector<std::string> bound_string = split_and_trim(m_line.substr(name_offset, m_line.size()));
if (bound_string.size() == 0) {
if (bound_string.empty()) {
set_m_ok_to_false();
(*m_message_stream) << "error at line " << m_line_number << std::endl;
throw m_line;