summaryrefslogtreecommitdiffstats
path: root/searchlib
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2022-05-31 15:05:50 +0200
committerGitHub <noreply@github.com>2022-05-31 15:05:50 +0200
commitc29b2b316d2c7820f25150d528241d1b349fccb2 (patch)
tree74e9f2eaac57e68fe95612b324f35bc141a10845 /searchlib
parent491b2e47d60b8f1d5a0f18325f8e6b0b4d8c30bf (diff)
parentf7b590bdfdb74098661a59eaf6ddbefec93aba5b (diff)
Merge pull request #22809 from vespa-engine/toregge/reduce-use-of-default-values-in-parameter-lists
Reduce use of default values in parameter lists.
Diffstat (limited to 'searchlib')
-rw-r--r--searchlib/src/vespa/searchlib/attribute/multistringattribute.h5
-rw-r--r--searchlib/src/vespa/searchlib/attribute/multistringattribute.hpp6
-rw-r--r--searchlib/src/vespa/searchlib/attribute/multistringpostattribute.h5
-rw-r--r--searchlib/src/vespa/searchlib/attribute/multistringpostattribute.hpp6
-rw-r--r--searchlib/src/vespa/searchlib/attribute/singlestringattribute.h4
-rw-r--r--searchlib/src/vespa/searchlib/attribute/singlestringattribute.hpp6
-rw-r--r--searchlib/src/vespa/searchlib/attribute/singlestringpostattribute.h4
-rw-r--r--searchlib/src/vespa/searchlib/attribute/singlestringpostattribute.hpp7
8 files changed, 33 insertions, 10 deletions
diff --git a/searchlib/src/vespa/searchlib/attribute/multistringattribute.h b/searchlib/src/vespa/searchlib/attribute/multistringattribute.h
index 4c3eeeed232..308ed6f82a3 100644
--- a/searchlib/src/vespa/searchlib/attribute/multistringattribute.h
+++ b/searchlib/src/vespa/searchlib/attribute/multistringattribute.h
@@ -44,9 +44,8 @@ protected:
using generation_t = StringAttribute::generation_t;
public:
- MultiValueStringAttributeT(const vespalib::string & name, const AttributeVector::Config & c =
- AttributeVector::Config(AttributeVector::BasicType::STRING,
- attribute::CollectionType::ARRAY));
+ MultiValueStringAttributeT(const vespalib::string & name, const AttributeVector::Config & c);
+ MultiValueStringAttributeT(const vespalib::string & name);
~MultiValueStringAttributeT();
void freezeEnumDictionary() override;
diff --git a/searchlib/src/vespa/searchlib/attribute/multistringattribute.hpp b/searchlib/src/vespa/searchlib/attribute/multistringattribute.hpp
index c3f8f99b4ab..ec67cafe90b 100644
--- a/searchlib/src/vespa/searchlib/attribute/multistringattribute.hpp
+++ b/searchlib/src/vespa/searchlib/attribute/multistringattribute.hpp
@@ -10,6 +10,7 @@
#include "multi_string_enum_hint_search_context.h"
#include <vespa/vespalib/text/utf8.h>
#include <vespa/vespalib/text/lowercase.h>
+#include <vespa/searchcommon/attribute/config.h>
#include <vespa/searchlib/util/bufferwriter.h>
#include <vespa/vespalib/util/regexp.h>
#include <vespa/vespalib/util/stash.h>
@@ -28,6 +29,11 @@ MultiValueStringAttributeT(const vespalib::string &name,
{ }
template <typename B, typename M>
+MultiValueStringAttributeT<B, M>::MultiValueStringAttributeT(const vespalib::string &name)
+ : MultiValueStringAttributeT<B, M>(name, AttributeVector::Config(AttributeVector::BasicType::STRING, attribute::CollectionType::ARRAY))
+{ }
+
+template <typename B, typename M>
MultiValueStringAttributeT<B, M>::~MultiValueStringAttributeT() = default;
diff --git a/searchlib/src/vespa/searchlib/attribute/multistringpostattribute.h b/searchlib/src/vespa/searchlib/attribute/multistringpostattribute.h
index b748dcf8f61..031d90a88ed 100644
--- a/searchlib/src/vespa/searchlib/attribute/multistringpostattribute.h
+++ b/searchlib/src/vespa/searchlib/attribute/multistringpostattribute.h
@@ -72,9 +72,8 @@ public:
using Dictionary = EnumPostingTree;
using PostingList = typename PostingParent::PostingList;
- MultiValueStringPostingAttributeT(const vespalib::string & name, const AttributeVector::Config & c =
- AttributeVector::Config(AttributeVector::BasicType::STRING,
- attribute::CollectionType::ARRAY));
+ MultiValueStringPostingAttributeT(const vespalib::string & name, const AttributeVector::Config & c);
+ MultiValueStringPostingAttributeT(const vespalib::string & name);
~MultiValueStringPostingAttributeT();
void removeOldGenerations(generation_t firstUsed) override;
diff --git a/searchlib/src/vespa/searchlib/attribute/multistringpostattribute.hpp b/searchlib/src/vespa/searchlib/attribute/multistringpostattribute.hpp
index d3cd338cacb..421e727761f 100644
--- a/searchlib/src/vespa/searchlib/attribute/multistringpostattribute.hpp
+++ b/searchlib/src/vespa/searchlib/attribute/multistringpostattribute.hpp
@@ -19,6 +19,12 @@ MultiValueStringPostingAttributeT<B, T>::MultiValueStringPostingAttributeT(const
}
template <typename B, typename T>
+MultiValueStringPostingAttributeT<B, T>::MultiValueStringPostingAttributeT(const vespalib::string & name)
+ : MultiValueStringPostingAttributeT<B, T>(name, AttributeVector::Config(AttributeVector::BasicType::STRING, attribute::CollectionType::ARRAY))
+{
+}
+
+template <typename B, typename T>
MultiValueStringPostingAttributeT<B, T>::~MultiValueStringPostingAttributeT()
{
this->disableFreeLists();
diff --git a/searchlib/src/vespa/searchlib/attribute/singlestringattribute.h b/searchlib/src/vespa/searchlib/attribute/singlestringattribute.h
index e9bde76d4ec..ad522627a59 100644
--- a/searchlib/src/vespa/searchlib/attribute/singlestringattribute.h
+++ b/searchlib/src/vespa/searchlib/attribute/singlestringattribute.h
@@ -32,8 +32,8 @@ protected:
using generation_t = StringAttribute::generation_t;
public:
- SingleValueStringAttributeT(const vespalib::string & name, const AttributeVector::Config & c =
- AttributeVector::Config(AttributeVector::BasicType::STRING));
+ SingleValueStringAttributeT(const vespalib::string & name, const AttributeVector::Config & c);
+ SingleValueStringAttributeT(const vespalib::string & name);
~SingleValueStringAttributeT();
void freezeEnumDictionary() override;
diff --git a/searchlib/src/vespa/searchlib/attribute/singlestringattribute.hpp b/searchlib/src/vespa/searchlib/attribute/singlestringattribute.hpp
index 50ea4ef42b6..64abbf86108 100644
--- a/searchlib/src/vespa/searchlib/attribute/singlestringattribute.hpp
+++ b/searchlib/src/vespa/searchlib/attribute/singlestringattribute.hpp
@@ -9,6 +9,7 @@
#include "single_string_enum_hint_search_context.h"
#include <vespa/vespalib/text/utf8.h>
#include <vespa/vespalib/text/lowercase.h>
+#include <vespa/searchcommon/attribute/config.h>
#include <vespa/searchlib/util/bufferwriter.h>
#include <vespa/vespalib/util/regexp.h>
#include <vespa/searchlib/query/query_term_ucs4.h>
@@ -26,6 +27,11 @@ SingleValueStringAttributeT(const vespalib::string &name,
{ }
template <typename B>
+SingleValueStringAttributeT<B>::SingleValueStringAttributeT(const vespalib::string &name)
+ : SingleValueStringAttributeT<B>(name, AttributeVector::Config(AttributeVector::BasicType::STRING))
+{ }
+
+template <typename B>
SingleValueStringAttributeT<B>::~SingleValueStringAttributeT() = default;
template <typename B>
diff --git a/searchlib/src/vespa/searchlib/attribute/singlestringpostattribute.h b/searchlib/src/vespa/searchlib/attribute/singlestringpostattribute.h
index 2643f11eaf3..30549f3048a 100644
--- a/searchlib/src/vespa/searchlib/attribute/singlestringpostattribute.h
+++ b/searchlib/src/vespa/searchlib/attribute/singlestringpostattribute.h
@@ -67,8 +67,8 @@ private:
void applyValueChanges(EnumStoreBatchUpdater& updater) override;
public:
- SingleValueStringPostingAttributeT(const vespalib::string & name, const AttributeVector::Config & c =
- AttributeVector::Config(AttributeVector::BasicType::STRING));
+ SingleValueStringPostingAttributeT(const vespalib::string & name, const AttributeVector::Config & c);
+ SingleValueStringPostingAttributeT(const vespalib::string & name);
~SingleValueStringPostingAttributeT();
void removeOldGenerations(generation_t firstUsed) override;
diff --git a/searchlib/src/vespa/searchlib/attribute/singlestringpostattribute.hpp b/searchlib/src/vespa/searchlib/attribute/singlestringpostattribute.hpp
index ddbc24d2b75..f340d9f70c3 100644
--- a/searchlib/src/vespa/searchlib/attribute/singlestringpostattribute.hpp
+++ b/searchlib/src/vespa/searchlib/attribute/singlestringpostattribute.hpp
@@ -4,6 +4,7 @@
#include "singlestringpostattribute.h"
#include "single_string_enum_search_context.h"
+#include <vespa/searchcommon/attribute/config.h>
#include <vespa/searchlib/query/query_term_ucs4.h>
namespace search {
@@ -17,6 +18,12 @@ SingleValueStringPostingAttributeT<B>::SingleValueStringPostingAttributeT(const
}
template <typename B>
+SingleValueStringPostingAttributeT<B>::SingleValueStringPostingAttributeT(const vespalib::string & name)
+ : SingleValueStringPostingAttributeT<B>(name, AttributeVector::Config(AttributeVector::BasicType::STRING))
+{
+}
+
+template <typename B>
SingleValueStringPostingAttributeT<B>::~SingleValueStringPostingAttributeT()
{
this->disableFreeLists();