Skip to content

Commit

Permalink
Update z3++.h
Browse files Browse the repository at this point in the history
simplify definition
  • Loading branch information
NikolajBjorner committed Dec 19, 2021
1 parent a7b1db6 commit 6a039c2
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/api/c++/z3++.h
Original file line number Diff line number Diff line change
Expand Up @@ -3426,12 +3426,9 @@ namespace z3 {
}

inline func_decl context::user_propagate_function(symbol const& name, sort_vector const& domain, sort const& range) {
array<Z3_sort> args(domain.size());
for (unsigned i = 0; i < domain.size(); i++) {
check_context(domain[i], range);
args[i] = domain[i];
}
Z3_func_decl f = Z3_solver_propagate_declare(range.ctx(), name, args.size(), args.ptr(), range);
check_context(domain, range);
array<Z3_sort> domain1(domain);
Z3_func_decl f = Z3_solver_propagate_declare(range.ctx(), name, domain1.size(), domain1.ptr(), range);
check_error();
return func_decl(*this, f);
}
Expand Down

0 comments on commit 6a039c2

Please sign in to comment.