3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-03-02 11:46:55 +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:
Bruce Mitchener 2018-02-06 11:21:17 +07:00
parent b2bd4dd3b4
commit 54b3cd0071
6 changed files with 25 additions and 2 deletions

View file

@ -97,6 +97,7 @@ struct frame_reducer : public iz3mgr {
// if multiple children of a tree node are used, we can't delete it
std::vector<int> used_children;
used_children.reserve(frames);
for(int i = 0; i < frames; i++)
used_children.push_back(0);
for(int i = 0; i < frames; i++)