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

@ -248,7 +248,7 @@ void square_sparse_matrix<T, X>::put_max_index_to_0(vector<indexed_value<T>> & r
template <typename T, typename X>
void square_sparse_matrix<T, X>::set_max_in_row(vector<indexed_value<T>> & row_vals) {
if (row_vals.size() == 0)
if (row_vals.empty())
return;
T max_val = abs(row_vals[0].m_value);
unsigned max_index = 0;
@ -386,7 +386,7 @@ bool square_sparse_matrix<T, X>::set_row_from_work_vector_and_clean_work_vector_
}
work_vec.m_index.clear();
auto & row_vals = m_rows[i0];
if (row_vals.size() == 0) {
if (row_vals.empty()) {
return false;
}
set_max_in_row(row_vals); // it helps to find larger pivots