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:
parent
50db22b2b2
commit
e2538afd32
2 changed files with 9 additions and 3 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue