aboutsummaryrefslogtreecommitdiffstats
path: root/searchlib
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@online.no>2022-05-31 14:31:43 +0200
committerTor Egge <Tor.Egge@online.no>2022-05-31 14:31:43 +0200
commitf7b590bdfdb74098661a59eaf6ddbefec93aba5b (patch)
tree8c012a0236ccb51f7f6847ce920bdb69d8effc7d /searchlib
parentda8c0d839fb45fddd4b59efa5a469d0b7e948d3f (diff)
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();