mirror of
https://github.com/Z3Prover/z3
synced 2025-04-07 18:05:21 +00:00
array resize must m_size
This commit is contained in:
parent
cca280ac47
commit
df73c58195
|
@ -388,7 +388,7 @@ namespace z3 {
|
|||
template<typename T2>
|
||||
array(ast_vector_tpl<T2> const & v);
|
||||
~array() { delete[] m_array; }
|
||||
void resize(unsigned sz) { delete[] m_array; m_array = new T[sz]; }
|
||||
void resize(unsigned sz) { delete[] m_array; m_size = sz; m_array = new T[sz]; }
|
||||
unsigned size() const { return m_size; }
|
||||
T & operator[](int i) { assert(0 <= i); assert(static_cast<unsigned>(i) < m_size); return m_array[i]; }
|
||||
T const & operator[](int i) const { assert(0 <= i); assert(static_cast<unsigned>(i) < m_size); return m_array[i]; }
|
||||
|
|
Loading…
Reference in a new issue