3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-06-19 07:06:28 +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;
public:
class key_data {
Key1 * m_key1;
Key2 * m_key2;
Key1 * m_key1 = nullptr;
Key2 * m_key2 = nullptr;
Value m_value;
unsigned m_hash;
unsigned m_hash = 0;
friend class entry;
public:
key_data():
m_key1(nullptr),
m_key2(nullptr),
m_hash(0) {
}
key_data() = default;
key_data(Key1 * k1, Key2 * k2):
m_key1(k1),
m_key2(k2) {

View file

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

View file

@ -30,17 +30,6 @@ class symbol_table {
struct key_data {
symbol m_key;
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 {
@ -129,7 +118,7 @@ public:
}
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 {
@ -148,11 +137,11 @@ public:
m_trail_stack.push_back(dummy);
key_data & new_entry = m_trail_stack.back();
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 {
m_sym_table.insert(key_data(key, data));
m_sym_table.insert(key_data{key, data});
}
}