3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-02-10 11:00:52 +00:00

delete more default constructors

reduces code size by 0.1%
This commit is contained in:
Nuno Lopes 2024-09-23 12:13:52 +01:00
parent 4b4a28239f
commit 737c2208fa
41 changed files with 35 additions and 91 deletions

View file

@ -26,7 +26,7 @@ public:
private:
#define ARRAY_SIZE_IDX -1
T * m_data;
T * m_data = nullptr;
void destroy_elements() {
iterator it = begin();
iterator e = end();
@ -71,7 +71,7 @@ public:
typedef T * iterator;
typedef const T * const_iterator;
array():m_data(nullptr) {}
array() = default;
/**
\brief Store the array in the given chunk of memory (mem).
@ -193,7 +193,7 @@ public:
template<typename T>
class ptr_array : public array<T *, false> {
public:
ptr_array() {}
ptr_array() = default;
ptr_array(void * mem, unsigned sz, T * const * vs):array<T*, false>(mem, sz, vs) {}
template<typename Allocator>
ptr_array(Allocator & a, unsigned sz, T * const * vs):array<T*, false>(a, sz, vs) {}
@ -205,7 +205,7 @@ public:
template<typename T>
class sarray : public array<T, false> {
public:
sarray() {}
sarray() = default;
sarray(void * mem, unsigned sz, T const * vs):array<T, false>(mem, sz, vs) {}
template<typename Allocator>
sarray(Allocator & a, unsigned sz, T const * vs):array<T, false>(a, sz, vs) {}