aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@online.no>2023-12-04 13:30:55 +0100
committerTor Egge <Tor.Egge@online.no>2023-12-04 13:30:55 +0100
commit79fa60286c827ab5167a094feaf63ebba57c80c4 (patch)
tree12a8d32a8806e1f64cdcd54d69ccba240fcbf795
parentdd033e14366dbafc22f0c40805ce4d251545f9ea (diff)
Use emplace_back.
-rw-r--r--streamingvisitors/src/vespa/vsm/searcher/floatfieldsearcher.cpp2
-rw-r--r--streamingvisitors/src/vespa/vsm/searcher/floatfieldsearcher.h2
-rw-r--r--streamingvisitors/src/vespa/vsm/searcher/intfieldsearcher.cpp2
-rw-r--r--streamingvisitors/src/vespa/vsm/searcher/intfieldsearcher.h2
4 files changed, 4 insertions, 4 deletions
diff --git a/streamingvisitors/src/vespa/vsm/searcher/floatfieldsearcher.cpp b/streamingvisitors/src/vespa/vsm/searcher/floatfieldsearcher.cpp
index 2accf56c57e..7dd40348f47 100644
--- a/streamingvisitors/src/vespa/vsm/searcher/floatfieldsearcher.cpp
+++ b/streamingvisitors/src/vespa/vsm/searcher/floatfieldsearcher.cpp
@@ -40,7 +40,7 @@ void FloatFieldSearcherT<T>::prepare(search::streaming::QueryTermList& qtl,
size_t sz(qt->termLen());
if (sz) {
auto range = qt->getRange<T>();
- _floatTerm.push_back(FloatInfo(range.low, range.high, range.valid));
+ _floatTerm.emplace_back(range.low, range.high, range.valid);
}
}
}
diff --git a/streamingvisitors/src/vespa/vsm/searcher/floatfieldsearcher.h b/streamingvisitors/src/vespa/vsm/searcher/floatfieldsearcher.h
index 38bb6704c3b..07b3f6e1c5f 100644
--- a/streamingvisitors/src/vespa/vsm/searcher/floatfieldsearcher.h
+++ b/streamingvisitors/src/vespa/vsm/searcher/floatfieldsearcher.h
@@ -20,7 +20,7 @@ protected:
class FloatInfo
{
public:
- FloatInfo(T low, T high, bool v) : _lower(low), _upper(high), _valid(v) { }
+ FloatInfo(T low, T high, bool v) noexcept : _lower(low), _upper(high), _valid(v) { }
bool cmp(T key) const;
bool valid() const { return _valid; }
void setValid(bool v) { _valid = v; }
diff --git a/streamingvisitors/src/vespa/vsm/searcher/intfieldsearcher.cpp b/streamingvisitors/src/vespa/vsm/searcher/intfieldsearcher.cpp
index a4de4f7eb27..e73c7f5c1a7 100644
--- a/streamingvisitors/src/vespa/vsm/searcher/intfieldsearcher.cpp
+++ b/streamingvisitors/src/vespa/vsm/searcher/intfieldsearcher.cpp
@@ -30,7 +30,7 @@ void IntFieldSearcher::prepare(search::streaming::QueryTermList& qtl,
size_t sz(qt->termLen());
if (sz) {
auto range = qt->getRange<int64_t>();
- _intTerm.push_back(IntInfo(range.low, range.high, range.valid));
+ _intTerm.emplace_back(range.low, range.high, range.valid);
}
}
}
diff --git a/streamingvisitors/src/vespa/vsm/searcher/intfieldsearcher.h b/streamingvisitors/src/vespa/vsm/searcher/intfieldsearcher.h
index 845fd2721cf..47b83c1538d 100644
--- a/streamingvisitors/src/vespa/vsm/searcher/intfieldsearcher.h
+++ b/streamingvisitors/src/vespa/vsm/searcher/intfieldsearcher.h
@@ -20,7 +20,7 @@ protected:
class IntInfo
{
public:
- IntInfo(int64_t low, int64_t high, bool v) : _lower(low), _upper(high), _valid(v) { }
+ IntInfo(int64_t low, int64_t high, bool v) noexcept : _lower(low), _upper(high), _valid(v) { }
bool cmp(int64_t key) const { return (_lower <= key) && (key <= _upper); }
bool valid() const { return _valid; }
private: