mirror of
https://github.com/Z3Prover/z3
synced 2025-08-30 15:00:08 +00:00
Reserve vector space when possible.
This fixes all current instances of the `performance-inefficient-vector-operation` warning in clang-tidy.
This commit is contained in:
parent
b2bd4dd3b4
commit
54b3cd0071
6 changed files with 25 additions and 2 deletions
|
@ -273,6 +273,7 @@ namespace Duality {
|
|||
if (!heads.contains(fd)) {
|
||||
int arity = f.arity();
|
||||
std::vector<expr> args;
|
||||
args.reserve(arity);
|
||||
for (int j = 0; j < arity; j++)
|
||||
args.push_back(_d->ctx.fresh_func_decl("X", f.domain(j))());
|
||||
expr c = implies(_d->ctx.bool_val(false), f(args));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue