mirror of
https://github.com/Z3Prover/z3
synced 2026-02-13 20:33:02 +00:00
remove default destructors
This commit is contained in:
parent
b170f10148
commit
3586b613f7
95 changed files with 25 additions and 259 deletions
|
|
@ -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