diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2019-06-13 11:39:44 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2019-06-13 11:39:44 +0000 |
commit | 8e9003f23694d432067b6a821bdf8184d8094bba (patch) | |
tree | c6d9b900bd50814d78ed1370f18b3dd4d85663db /searchlib/src | |
parent | 989a460db633115b535fde5298f6a064b794ee9f (diff) |
Use universal ref and std::forward.
Diffstat (limited to 'searchlib/src')
-rw-r--r-- | searchlib/src/vespa/searchlib/features/internal_max_reduce_prod_join_feature.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/searchlib/src/vespa/searchlib/features/internal_max_reduce_prod_join_feature.cpp b/searchlib/src/vespa/searchlib/features/internal_max_reduce_prod_join_feature.cpp index 4d4f1ac4418..fd1faeae5ea 100644 --- a/searchlib/src/vespa/searchlib/features/internal_max_reduce_prod_join_feature.cpp +++ b/searchlib/src/vespa/searchlib/features/internal_max_reduce_prod_join_feature.cpp @@ -137,7 +137,7 @@ bool supportsGetRawValues(const A &attr) noexcept { template<typename BaseType, typename V> FeatureExecutor & -selectTypedExecutor(const IAttributeVector *attribute, V vector, vespalib::Stash &stash) { +selectTypedExecutor(const IAttributeVector *attribute, V && vector, vespalib::Stash &stash) { if (!attribute->isImported()) { using A = IntegerAttributeTemplate<BaseType>; using VT = multivalue::Value<BaseType>; @@ -147,22 +147,22 @@ selectTypedExecutor(const IAttributeVector *attribute, V vector, vespalib::Stash if (supportsGetRawValues(*iattr)) { const ExactA *exactA = dynamic_cast<const ExactA *>(iattr); if (exactA != nullptr) { - return stash.create<RawExecutor<BaseType>>(attribute, std::move(vector)); + return stash.create<RawExecutor<BaseType>>(attribute, std::forward<V>(vector)); } } } - return stash.create<BufferedExecutor<BaseType>>(attribute, std::move(vector)); + return stash.create<BufferedExecutor<BaseType>>(attribute, std::forward<V>(vector)); } template<typename V> FeatureExecutor & -selectExecutor(const IAttributeVector *attribute, V vector, vespalib::Stash &stash) { +selectExecutor(const IAttributeVector *attribute, V && vector, vespalib::Stash &stash) { if (attribute->getCollectionType() == CollectionType::ARRAY) { switch (attribute->getBasicType()) { case BasicType::INT32: - return selectTypedExecutor<int32_t, V>(attribute, std::move(vector), stash); + return selectTypedExecutor<int32_t, V>(attribute, std::forward<V>(vector), stash); case BasicType::INT64: - return selectTypedExecutor<int64_t, V>(attribute, std::move(vector), stash); + return selectTypedExecutor<int64_t, V>(attribute, std::forward<V>(vector), stash); default: break; } |