3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-14 06:45:25 +00:00

remove a bunch of constructors to avoid copies

still not enough to guarantee that vector::expand doesnt copy (WIP)
This commit is contained in:
Nuno Lopes 2020-06-03 17:09:27 +01:00
parent 98b5abb1d4
commit 7ac2791482
16 changed files with 66 additions and 83 deletions

View file

@ -16,8 +16,7 @@ Author:
Revision History:
--*/
#ifndef SAT_MODEL_CONVERTER_H_
#define SAT_MODEL_CONVERTER_H_
#pragma once
#include "sat/sat_types.h"
#include "util/ref_vector.h"
@ -51,12 +50,12 @@ namespace sat {
unsigned m_counter;
unsigned m_refcount;
elim_stackv m_stack;
elim_stack(elim_stack const& );
public:
elim_stack(elim_stackv const& stack):
elim_stack(elim_stack const&) = delete;
elim_stack(elim_stackv && stack):
m_counter(0),
m_refcount(0),
m_stack(stack) {
m_stack(std::move(stack)) {
m_counter = ++counter;
}
~elim_stack() { }
@ -76,14 +75,6 @@ namespace sat {
sref_vector<elim_stack> m_elim_stack;
entry(kind k, bool_var v): m_var(v), m_kind(k) {}
public:
entry(entry const & src):
m_var(src.m_var),
m_kind(src.m_kind),
m_clauses(src.m_clauses),
m_clause(src.m_clause)
{
m_elim_stack.append(src.m_elim_stack);
}
bool_var var() const { return m_var; }
kind get_kind() const { return m_kind; }
};
@ -166,5 +157,3 @@ namespace sat {
}
};
#endif