diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2023-05-12 13:28:36 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2023-05-12 13:28:36 +0000 |
commit | 2b9d5158ffd67d49bc23ea25044f62c0c36b2070 (patch) | |
tree | b0ea03fbad1468bc242789ddba1fa786c61da9a0 /searchlib/src/tests/queryeval/blueprint/mysearch.h | |
parent | 579ce1c7cee8880426b76fc24ad14e02282d880b (diff) |
Use SmallVector to avoid allocation in the common case.
Diffstat (limited to 'searchlib/src/tests/queryeval/blueprint/mysearch.h')
-rw-r--r-- | searchlib/src/tests/queryeval/blueprint/mysearch.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/searchlib/src/tests/queryeval/blueprint/mysearch.h b/searchlib/src/tests/queryeval/blueprint/mysearch.h index 6e8b6fa9adc..4fa53443123 100644 --- a/searchlib/src/tests/queryeval/blueprint/mysearch.h +++ b/searchlib/src/tests/queryeval/blueprint/mysearch.h @@ -110,9 +110,12 @@ public: SearchIterator::UP createLeafSearch(const TFMDA &tfmda, bool strict) const override { - return SearchIterator::UP(new MySearch("leaf", tfmda, strict)); + return std::make_unique<MySearch>("leaf", tfmda, strict); } + MyLeaf() + : SimpleLeafBlueprint(), _got_global_filter(false) + {} MyLeaf(FieldSpecBaseList fields) : SimpleLeafBlueprint(std::move(fields)), _got_global_filter(false) {} |