3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-07-04 06:16:09 +00:00

remove a few more useless constructors

This commit is contained in:
Nuno Lopes 2026-06-16 12:18:04 +01:00
parent 82777c0092
commit 3fed9eadae
3 changed files with 12 additions and 32 deletions

View file

@ -59,17 +59,13 @@ protected:
class entry; class entry;
public: public:
class key_data { class key_data {
Key1 * m_key1; Key1 * m_key1 = nullptr;
Key2 * m_key2; Key2 * m_key2 = nullptr;
Value m_value; Value m_value;
unsigned m_hash; unsigned m_hash = 0;
friend class entry; friend class entry;
public: public:
key_data(): key_data() = default;
m_key1(nullptr),
m_key2(nullptr),
m_hash(0) {
}
key_data(Key1 * k1, Key2 * k2): key_data(Key1 * k1, Key2 * k2):
m_key1(k1), m_key1(k1),
m_key2(k2) { m_key2(k2) {

View file

@ -60,19 +60,14 @@ protected:
class entry; class entry;
public: public:
class key_data { class key_data {
Key1 * m_key1; Key1 * m_key1 = nullptr;
Key2 * m_key2; Key2 * m_key2 = nullptr;
Key3 * m_key3; Key3 * m_key3 = nullptr;
Value m_value; Value m_value;
unsigned m_hash; unsigned m_hash = 0;
friend class entry; friend class entry;
public: public:
key_data(): key_data() = default;
m_key1(nullptr),
m_key2(nullptr),
m_key3(nullptr),
m_hash(0) {
}
key_data(Key1 * k1, Key2 * k2, Key3 * k3): key_data(Key1 * k1, Key2 * k2, Key3 * k3):
m_key1(k1), m_key1(k1),
m_key2(k2), m_key2(k2),

View file

@ -30,17 +30,6 @@ class symbol_table {
struct key_data { struct key_data {
symbol m_key; symbol m_key;
T m_data; T m_data;
key_data() = default;
explicit key_data(symbol k):
m_key(k) {
}
key_data(symbol k, const T & d):
m_key(k),
m_data(d) {
}
}; };
struct key_data_hash_proc { struct key_data_hash_proc {
@ -129,7 +118,7 @@ public:
} }
bool contains(symbol key) const { bool contains(symbol key) const {
return m_sym_table.contains(key_data(key)); return m_sym_table.contains(key_data{key});
} }
unsigned get_scope_level() const { unsigned get_scope_level() const {
@ -148,11 +137,11 @@ public:
m_trail_stack.push_back(dummy); m_trail_stack.push_back(dummy);
key_data & new_entry = m_trail_stack.back(); key_data & new_entry = m_trail_stack.back();
new_entry.m_key = symbol::mark(new_entry.m_key); new_entry.m_key = symbol::mark(new_entry.m_key);
m_sym_table.insert(key_data(key, data)); m_sym_table.insert(key_data{key, data});
} }
} }
else { else {
m_sym_table.insert(key_data(key, data)); m_sym_table.insert(key_data{key, data});
} }
} }