mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 17:15:31 +00:00
delete more default constructors
reduces code size by 0.1%
This commit is contained in:
parent
4b4a28239f
commit
737c2208fa
41 changed files with 35 additions and 91 deletions
|
@ -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) {}
|
||||
|
|
|
@ -275,6 +275,6 @@ public:
|
|||
template<typename T, unsigned INITIAL_SIZE=16>
|
||||
class sbuffer : public buffer<T, false, INITIAL_SIZE> {
|
||||
public:
|
||||
sbuffer(): buffer<T, false, INITIAL_SIZE>() {}
|
||||
sbuffer() = default;
|
||||
sbuffer(unsigned sz, const T& elem) : buffer<T, false, INITIAL_SIZE>(sz,elem) {}
|
||||
};
|
||||
|
|
|
@ -65,7 +65,7 @@ class inf_rational {
|
|||
return s;
|
||||
}
|
||||
|
||||
inf_rational() {}
|
||||
inf_rational() = default;
|
||||
|
||||
explicit inf_rational(int n):
|
||||
m_first(rational(n)),
|
||||
|
|
|
@ -119,7 +119,7 @@ namespace sat {
|
|||
literal_set(literal_vector const& v) {
|
||||
for (unsigned i = 0; i < v.size(); ++i) insert(v[i]);
|
||||
}
|
||||
literal_set() {}
|
||||
literal_set() = default;
|
||||
literal_vector to_vector() const {
|
||||
literal_vector result;
|
||||
for (literal lit : *this) result.push_back(lit);
|
||||
|
@ -146,7 +146,6 @@ namespace sat {
|
|||
literal operator*() const { return to_literal(*m_it); }
|
||||
iterator& operator++() { ++m_it; return *this; }
|
||||
iterator operator++(int) { iterator tmp = *this; ++m_it; return tmp; }
|
||||
bool operator==(iterator const& it) const { return m_it == it.m_it; }
|
||||
bool operator!=(iterator const& it) const { return m_it != it.m_it; }
|
||||
};
|
||||
iterator begin() const { return iterator(m_set.begin()); }
|
||||
|
|
|
@ -52,7 +52,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
stacked_value() {}
|
||||
stacked_value() = default;
|
||||
stacked_value(const T& m) {
|
||||
m_value = m;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue