mirror of
https://github.com/Z3Prover/z3
synced 2025-04-06 17:44:08 +00:00
Avoid null pointer warnings in justifications.
This commit is contained in:
parent
c4b26cd691
commit
7d35fcb17e
|
@ -246,13 +246,15 @@ namespace smt {
|
||||||
|
|
||||||
simple_justification::simple_justification(region & r, unsigned num_lits, literal const * lits):
|
simple_justification::simple_justification(region & r, unsigned num_lits, literal const * lits):
|
||||||
m_num_literals(num_lits) {
|
m_num_literals(num_lits) {
|
||||||
m_literals = new (r) literal[num_lits];
|
if (num_lits != 0) {
|
||||||
memcpy(m_literals, lits, sizeof(literal) * num_lits);
|
m_literals = new (r) literal[num_lits];
|
||||||
|
memcpy(m_literals, lits, sizeof(literal) * num_lits);
|
||||||
#ifdef Z3DEBUG
|
#ifdef Z3DEBUG
|
||||||
for (unsigned i = 0; i < num_lits; i++) {
|
for (unsigned i = 0; i < num_lits; i++) {
|
||||||
SASSERT(lits[i] != null_literal);
|
SASSERT(lits[i] != null_literal);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void simple_justification::get_antecedents(conflict_resolution & cr) {
|
void simple_justification::get_antecedents(conflict_resolution & cr) {
|
||||||
|
|
Loading…
Reference in a new issue