summaryrefslogtreecommitdiffstats
path: root/searchlib/src/vespa/searchlib/fef/matchdatalayout.h
diff options
context:
space:
mode:
Diffstat (limited to 'searchlib/src/vespa/searchlib/fef/matchdatalayout.h')
-rw-r--r--searchlib/src/vespa/searchlib/fef/matchdatalayout.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/searchlib/src/vespa/searchlib/fef/matchdatalayout.h b/searchlib/src/vespa/searchlib/fef/matchdatalayout.h
index 05d25a322db..8f7717ce7ac 100644
--- a/searchlib/src/vespa/searchlib/fef/matchdatalayout.h
+++ b/searchlib/src/vespa/searchlib/fef/matchdatalayout.h
@@ -14,14 +14,16 @@ namespace search::fef {
class MatchDataLayout
{
private:
- uint32_t _numTermFields;
std::vector<uint32_t> _fieldIds;
-
public:
/**
* Create an empty object.
**/
MatchDataLayout();
+ MatchDataLayout(MatchDataLayout &&) noexcept = default;
+ MatchDataLayout & operator=(MatchDataLayout &&) noexcept = default;
+ MatchDataLayout(const MatchDataLayout &) = default;
+ MatchDataLayout & operator=(const MatchDataLayout &) = delete;
~MatchDataLayout();
/**
@@ -32,8 +34,9 @@ public:
**/
TermFieldHandle allocTermField(uint32_t fieldId) {
_fieldIds.push_back(fieldId);
- return _numTermFields++;
+ return _fieldIds.size() - 1;
}
+ void reserve(size_t sz) { _fieldIds.reserve(sz); }
/**
* Create a match data object with the layout described by this