mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 17:15:31 +00:00
remove default destructors
This commit is contained in:
parent
b170f10148
commit
3586b613f7
95 changed files with 25 additions and 259 deletions
|
@ -89,10 +89,6 @@ hwf_manager::hwf_manager() :
|
|||
// to the precision (not sure about the rounding modes though).
|
||||
}
|
||||
|
||||
hwf_manager::~hwf_manager()
|
||||
{
|
||||
}
|
||||
|
||||
uint64_t RAW(double X) { uint64_t tmp; memcpy(&tmp, &(X), sizeof(uint64_t)); return tmp; }
|
||||
double DBL(uint64_t X) { double tmp; memcpy(&tmp, &(X), sizeof(double)); return tmp; }
|
||||
|
||||
|
|
|
@ -46,7 +46,6 @@ class hwf_manager {
|
|||
public:
|
||||
typedef hwf numeral;
|
||||
hwf_manager();
|
||||
~hwf_manager();
|
||||
|
||||
void reset(hwf & o) { set(o, 0); }
|
||||
void set(hwf & o, int value);
|
||||
|
|
|
@ -24,19 +24,6 @@ template<typename Key, typename Value>
|
|||
struct _key_data {
|
||||
Key m_key;
|
||||
Value m_value;
|
||||
_key_data() {
|
||||
}
|
||||
_key_data(Key const & k):
|
||||
m_key(k) {
|
||||
}
|
||||
_key_data(Key const & k, Value const & v):
|
||||
m_key(k),
|
||||
m_value(v) {
|
||||
}
|
||||
_key_data(Key const& k, Value&& v):
|
||||
m_key(k),
|
||||
m_value(std::move(v)) {
|
||||
}
|
||||
};
|
||||
|
||||
template<typename Entry, typename HashProc, typename EqProc>
|
||||
|
@ -108,27 +95,27 @@ public:
|
|||
}
|
||||
|
||||
void insert(key const & k, value const & v) {
|
||||
m_table.insert(key_data(k, v));
|
||||
m_table.insert(key_data{k, v});
|
||||
}
|
||||
|
||||
void insert(key const& k, value&& v) {
|
||||
m_table.insert(key_data(k, std::move(v)));
|
||||
m_table.insert(key_data{k, std::move(v)});
|
||||
}
|
||||
|
||||
bool insert_if_not_there_core(key const & k, value const & v, entry *& et) {
|
||||
return m_table.insert_if_not_there_core(key_data(k,v), et);
|
||||
return m_table.insert_if_not_there_core(key_data{k,v}, et);
|
||||
}
|
||||
|
||||
value & insert_if_not_there(key const & k, value const & v) {
|
||||
return m_table.insert_if_not_there2(key_data(k, v))->get_data().m_value;
|
||||
return m_table.insert_if_not_there2(key_data{k, v})->get_data().m_value;
|
||||
}
|
||||
|
||||
entry * insert_if_not_there3(key const & k, value const & v) {
|
||||
return m_table.insert_if_not_there2(key_data(k, v));
|
||||
return m_table.insert_if_not_there2(key_data{k, v});
|
||||
}
|
||||
|
||||
entry * find_core(key const & k) const {
|
||||
return m_table.find_core(key_data(k));
|
||||
return m_table.find_core(key_data{k});
|
||||
}
|
||||
|
||||
bool find(key const & k, value & v) const {
|
||||
|
@ -150,7 +137,7 @@ public:
|
|||
}
|
||||
|
||||
iterator find_iterator(key const & k) const {
|
||||
return m_table.find(key_data(k));
|
||||
return m_table.find(key_data{k});
|
||||
}
|
||||
|
||||
value const & find(key const& k) const {
|
||||
|
@ -175,7 +162,7 @@ public:
|
|||
}
|
||||
|
||||
void remove(key const & k) {
|
||||
m_table.remove(key_data(k));
|
||||
m_table.remove(key_data{k});
|
||||
}
|
||||
|
||||
void erase(key const & k) {
|
||||
|
|
|
@ -60,7 +60,7 @@ public:
|
|||
Value m_value;
|
||||
key_data() = default;
|
||||
key_data(Key * k):
|
||||
m_key(k), m_value() {
|
||||
m_key(k) {
|
||||
}
|
||||
key_data(Key * k, Value const & v):
|
||||
m_key(k),
|
||||
|
|
|
@ -21,7 +21,7 @@ Revision History:
|
|||
|
||||
template<typename T>
|
||||
class ref {
|
||||
T * m_ptr;
|
||||
T * m_ptr = nullptr;
|
||||
|
||||
void inc_ref() {
|
||||
if (m_ptr) {
|
||||
|
@ -36,9 +36,7 @@ class ref {
|
|||
}
|
||||
|
||||
public:
|
||||
ref():
|
||||
m_ptr(nullptr) {
|
||||
}
|
||||
ref() = default;
|
||||
|
||||
ref(T * ptr):
|
||||
m_ptr(ptr) {
|
||||
|
@ -50,9 +48,9 @@ public:
|
|||
inc_ref();
|
||||
}
|
||||
|
||||
ref (ref && r) noexcept : m_ptr(nullptr) {
|
||||
std::swap(m_ptr, r.m_ptr);
|
||||
}
|
||||
ref(ref && r) noexcept {
|
||||
std::swap(m_ptr, r.m_ptr);
|
||||
}
|
||||
|
||||
~ref() {
|
||||
dec_ref();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue