3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-28 19:35:50 +00:00

better diagnostics in lar_solver and more efficient int_set::resize()

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
This commit is contained in:
Lev Nachmanson 2020-03-24 10:31:14 -07:00
parent 50db22b2b2
commit e2538afd32
2 changed files with 9 additions and 3 deletions

View file

@ -63,11 +63,17 @@ public:
void resize(unsigned size) {
if (size < data_size()) {
bool copy = false;
unsigned i = 0;
for (unsigned j : m_index) {
if (j < size) {
m_data[j] = i;
m_index[i++] = j;
if (copy) {
m_data[j] = i;
m_index[i] = j;
}
i++;
} else {
copy = true;
}
}
m_index.shrink(i);