summaryrefslogtreecommitdiffstats
path: root/document
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@oath.com>2018-08-12 22:35:37 +0200
committerHenning Baldersheim <balder@oath.com>2018-08-12 22:35:37 +0200
commitbd7421d6b4cbf27f6d67d37f68212541f2aefcf4 (patch)
treea281a8b30cecbe1d5047a1f1404ecd41105f1d65 /document
parentd38b49ddb881a67250ed738382d1ff72283cd45b (diff)
Remove whitespace
Diffstat (limited to 'document')
-rw-r--r--document/src/tests/documentselectparsertest.cpp4
-rw-r--r--document/src/vespa/document/base/field.cpp4
-rw-r--r--document/src/vespa/document/base/field.h4
-rw-r--r--document/src/vespa/document/base/globalid.cpp2
-rw-r--r--document/src/vespa/document/base/idstring.h12
-rw-r--r--document/src/vespa/document/datatype/collectiondatatype.cpp4
-rw-r--r--document/src/vespa/document/datatype/collectiondatatype.h4
-rw-r--r--document/src/vespa/document/datatype/datatype.cpp8
-rw-r--r--document/src/vespa/document/datatype/datatype.h4
-rw-r--r--document/src/vespa/document/datatype/documenttype.h2
-rw-r--r--document/src/vespa/document/datatype/structdatatype.cpp4
-rw-r--r--document/src/vespa/document/datatype/structdatatype.h2
-rw-r--r--document/src/vespa/document/datatype/structureddatatype.h8
-rw-r--r--document/src/vespa/document/fieldset/fieldsetrepo.cpp2
-rw-r--r--document/src/vespa/document/fieldvalue/collectionfieldvalue.h6
-rw-r--r--document/src/vespa/document/fieldvalue/document.cpp4
-rw-r--r--document/src/vespa/document/fieldvalue/document.h4
-rw-r--r--document/src/vespa/document/fieldvalue/literalfieldvalue.cpp2
-rw-r--r--document/src/vespa/document/fieldvalue/numericfieldvalue.hpp2
-rw-r--r--document/src/vespa/document/fieldvalue/structfieldvalue.cpp4
-rw-r--r--document/src/vespa/document/fieldvalue/structfieldvalue.h4
-rw-r--r--document/src/vespa/document/fieldvalue/structuredfieldvalue.cpp12
-rw-r--r--document/src/vespa/document/fieldvalue/structuredfieldvalue.h14
-rw-r--r--document/src/vespa/document/fieldvalue/structuredfieldvalue.hpp2
-rw-r--r--document/src/vespa/document/fieldvalue/weightedsetfieldvalue.h8
-rw-r--r--document/src/vespa/document/select/branch.h2
-rw-r--r--document/src/vespa/document/select/doctype.cpp2
-rw-r--r--document/src/vespa/document/select/doctype.h2
-rw-r--r--document/src/vespa/document/select/invalidconstant.cpp2
-rw-r--r--document/src/vespa/document/select/node.h2
-rw-r--r--document/src/vespa/document/select/operator.cpp12
-rw-r--r--document/src/vespa/document/select/operator.h14
-rw-r--r--document/src/vespa/document/select/simpleparser.cpp10
-rw-r--r--document/src/vespa/document/select/simpleparser.h14
-rw-r--r--document/src/vespa/document/select/value.cpp2
-rw-r--r--document/src/vespa/document/select/value.h2
-rw-r--r--document/src/vespa/document/select/valuenodes.cpp6
-rw-r--r--document/src/vespa/document/select/valuenodes.h6
-rw-r--r--document/src/vespa/document/util/stringutil.cpp2
-rw-r--r--document/src/vespa/document/util/stringutil.h2
40 files changed, 103 insertions, 103 deletions
diff --git a/document/src/tests/documentselectparsertest.cpp b/document/src/tests/documentselectparsertest.cpp
index 56c4e66cd1c..2e4f66cebd0 100644
--- a/document/src/tests/documentselectparsertest.cpp
+++ b/document/src/tests/documentselectparsertest.cpp
@@ -67,7 +67,7 @@ class DocumentSelectParserTest : public CppUnit::TestFixture {
parseFieldValue(const std::string& expression);
template <typename ContainsType>
- select::ResultList doParse(vespalib::stringref expr,
+ select::ResultList doParse(vespalib::stringref expr,
const ContainsType& t);
std::string parse_to_tree(const std::string& str);
@@ -526,7 +526,7 @@ void DocumentSelectParserTest::testParseBranches()
template <typename ContainsType>
select::ResultList
-DocumentSelectParserTest::doParse(vespalib::stringref expr,
+DocumentSelectParserTest::doParse(vespalib::stringref expr,
const ContainsType& t)
{
std::unique_ptr<select::Node> root(_parser->parse(expr));
diff --git a/document/src/vespa/document/base/field.cpp b/document/src/vespa/document/base/field.cpp
index c9173aa7457..be5d94ce7f0 100644
--- a/document/src/vespa/document/base/field.cpp
+++ b/document/src/vespa/document/base/field.cpp
@@ -11,7 +11,7 @@ namespace document {
Field::Field() : Field("", 0, *DataType::INT, false) { }
-Field::Field(vespalib::stringref name, int fieldId,
+Field::Field(vespalib::stringref name, int fieldId,
const DataType& dataType, bool headerField)
: FieldBase(name),
_dataType(&dataType),
@@ -19,7 +19,7 @@ Field::Field(vespalib::stringref name, int fieldId,
_isHeaderField(headerField)
{ }
-Field::Field(vespalib::stringref name,
+Field::Field(vespalib::stringref name,
const DataType& dataType, bool headerField)
: FieldBase(name),
_dataType(&dataType),
diff --git a/document/src/vespa/document/base/field.h b/document/src/vespa/document/base/field.h
index 9f4bc09015f..f17a0a41703 100644
--- a/document/src/vespa/document/base/field.h
+++ b/document/src/vespa/document/base/field.h
@@ -48,7 +48,7 @@ public:
* @param type The datatype of the field.
* @param headerField Whether or not this is a "header" field.
*/
- Field(vespalib::stringref name, int fieldId,
+ Field(vespalib::stringref name, int fieldId,
const DataType &type, bool headerField);
Field();
@@ -61,7 +61,7 @@ public:
* @param dataType The datatype of the field.
* @param headerField Whether or not this is a "header" field.
*/
- Field(vespalib::stringref name, const DataType &dataType, bool headerField);
+ Field(vespalib::stringref name, const DataType &dataType, bool headerField);
Field* clone() const override { return new Field(*this); }
std::unique_ptr<FieldValue> createValue() const;
diff --git a/document/src/vespa/document/base/globalid.cpp b/document/src/vespa/document/base/globalid.cpp
index ca5235fac0b..bdf81d1c3c8 100644
--- a/document/src/vespa/document/base/globalid.cpp
+++ b/document/src/vespa/document/base/globalid.cpp
@@ -85,7 +85,7 @@ vespalib::string GlobalId::toString() const {
}
GlobalId
-GlobalId::parse(vespalib::stringref source)
+GlobalId::parse(vespalib::stringref source)
{
if (source.substr(0, 6) != "gid(0x") {
throw vespalib::IllegalArgumentException(
diff --git a/document/src/vespa/document/base/idstring.h b/document/src/vespa/document/base/idstring.h
index 27e49c6f6ff..583e502e7ab 100644
--- a/document/src/vespa/document/base/idstring.h
+++ b/document/src/vespa/document/base/idstring.h
@@ -24,7 +24,7 @@ public:
static const vespalib::string & getTypeName(Type t);
/** @throws document::IdParseException If parsing of id scheme failed. */
- static IdString::UP createIdString(vespalib::stringref id) { return createIdString(id.data(), id.size()); }
+ static IdString::UP createIdString(vespalib::stringref id) { return createIdString(id.data(), id.size()); }
static IdString::UP createIdString(const char *id, size_t sz);
~IdString() {}
@@ -129,8 +129,8 @@ private:
*/
class DocIdString final : public IdString {
public:
- DocIdString(vespalib::stringref ns, vespalib::stringref id);
- DocIdString(vespalib::stringref rawId);
+ DocIdString(vespalib::stringref ns, vespalib::stringref id);
+ DocIdString(vespalib::stringref rawId);
private:
DocIdString* clone() const override { return new DocIdString(*this); }
Type getType() const override { return DOC; }
@@ -150,7 +150,7 @@ private:
*/
class UserDocIdString final : public IdString {
public:
- UserDocIdString(vespalib::stringref rawId);
+ UserDocIdString(vespalib::stringref rawId);
virtual int64_t getUserId() const { return _userId; }
bool hasNumber() const override { return true; }
@@ -172,7 +172,7 @@ private:
*/
class OrderDocIdString final : public IdString {
public:
- OrderDocIdString(vespalib::stringref rawId);
+ OrderDocIdString(vespalib::stringref rawId);
int64_t getUserId() const { return _location; }
uint16_t getWidthBits() const { return _widthBits; }
@@ -207,7 +207,7 @@ private:
*/
class GroupDocIdString : public IdString {
public:
- GroupDocIdString(vespalib::stringref rawId);
+ GroupDocIdString(vespalib::stringref rawId);
bool hasGroup() const override { return true; }
vespalib::stringref getGroup() const override { return getComponent(1); }
LocationType getLocation() const override;
diff --git a/document/src/vespa/document/datatype/collectiondatatype.cpp b/document/src/vespa/document/datatype/collectiondatatype.cpp
index 4642ce31b13..3678989adfa 100644
--- a/document/src/vespa/document/datatype/collectiondatatype.cpp
+++ b/document/src/vespa/document/datatype/collectiondatatype.cpp
@@ -24,13 +24,13 @@ CollectionDataType::operator=(const CollectionDataType& other)
return *this;
}
-CollectionDataType::CollectionDataType(vespalib::stringref name,
+CollectionDataType::CollectionDataType(vespalib::stringref name,
const DataType& nestedType)
: DataType(name),
_nestedType(&nestedType) {
}
-CollectionDataType::CollectionDataType(vespalib::stringref name,
+CollectionDataType::CollectionDataType(vespalib::stringref name,
const DataType& nestedType,
int32_t id)
: DataType(name, id),
diff --git a/document/src/vespa/document/datatype/collectiondatatype.h b/document/src/vespa/document/datatype/collectiondatatype.h
index 3f59a09e876..10cf636e70f 100644
--- a/document/src/vespa/document/datatype/collectiondatatype.h
+++ b/document/src/vespa/document/datatype/collectiondatatype.h
@@ -20,9 +20,9 @@ protected:
CollectionDataType() : _nestedType(0) {}
CollectionDataType(const CollectionDataType&);
CollectionDataType& operator=(const CollectionDataType&);
- CollectionDataType(vespalib::stringref name,
+ CollectionDataType(vespalib::stringref name,
const DataType &nestedType);
- CollectionDataType(vespalib::stringref name,
+ CollectionDataType(vespalib::stringref name,
const DataType &nestedType, int32_t id);
public:
diff --git a/document/src/vespa/document/datatype/datatype.cpp b/document/src/vespa/document/datatype/datatype.cpp
index 190f0213582..aef155999a4 100644
--- a/document/src/vespa/document/datatype/datatype.cpp
+++ b/document/src/vespa/document/datatype/datatype.cpp
@@ -118,7 +118,7 @@ namespace {
// ASCII characters. Probably screwed up otherwise, but generated ids
// should only be used in testing anyways. In production this will be
// set from the document manager config.
-uint32_t crappyJavaStringHash(vespalib::stringref value) {
+uint32_t crappyJavaStringHash(vespalib::stringref value) {
uint32_t h = 0;
for (uint32_t i = 0; i < value.size(); ++i) {
h = 31 * h + value[i];
@@ -126,7 +126,7 @@ uint32_t crappyJavaStringHash(vespalib::stringref value) {
return h;
}
-int32_t createId(vespalib::stringref name)
+int32_t createId(vespalib::stringref name)
{
if (name == "Tag") {
return DataType::T_TAG;
@@ -142,13 +142,13 @@ DataType::DataType()
{
}
-DataType::DataType(vespalib::stringref name, int dataTypeId)
+DataType::DataType(vespalib::stringref name, int dataTypeId)
: _dataTypeId(dataTypeId),
_name(name)
{
}
-DataType::DataType(vespalib::stringref name)
+DataType::DataType(vespalib::stringref name)
: _dataTypeId(createId(name)),
_name(name)
{
diff --git a/document/src/vespa/document/datatype/datatype.h b/document/src/vespa/document/datatype/datatype.h
index 357349b2eff..0e444ce8d3b 100644
--- a/document/src/vespa/document/datatype/datatype.h
+++ b/document/src/vespa/document/datatype/datatype.h
@@ -38,12 +38,12 @@ protected:
* everyone to be able to use them. Only tests and the type manager reading
* config should need to create datatypes.
*/
- DataType(vespalib::stringref name, int dataTypeId);
+ DataType(vespalib::stringref name, int dataTypeId);
/**
* Creates a datatype using the hash of name as the id.
*/
- explicit DataType(vespalib::stringref name);
+ explicit DataType(vespalib::stringref name);
public:
virtual ~DataType();
diff --git a/document/src/vespa/document/datatype/documenttype.h b/document/src/vespa/document/datatype/documenttype.h
index 78abd3077e6..7fcf5dfa237 100644
--- a/document/src/vespa/document/datatype/documenttype.h
+++ b/document/src/vespa/document/datatype/documenttype.h
@@ -82,7 +82,7 @@ public:
uint32_t getFieldCount() const override {
return _fields->getFieldCount();
}
- const Field & getField(vespalib::stringref name) const override;
+ const Field & getField(vespalib::stringref name) const override;
const Field & getField(int fieldId) const override;
bool hasField(vespalib::stringref name) const override;
bool hasField(int fieldId) const override;
diff --git a/document/src/vespa/document/datatype/structdatatype.cpp b/document/src/vespa/document/datatype/structdatatype.cpp
index 35cd02dab88..3ccb08c32be 100644
--- a/document/src/vespa/document/datatype/structdatatype.cpp
+++ b/document/src/vespa/document/datatype/structdatatype.cpp
@@ -33,7 +33,7 @@ StructDataType::StructDataType(vespalib::stringref name)
_compressionConfig()
{ }
-StructDataType::StructDataType(vespalib::stringref name, int32_t dataTypeId)
+StructDataType::StructDataType(vespalib::stringref name, int32_t dataTypeId)
: StructuredDataType(name, dataTypeId),
_nameFieldMap(),
_idFieldMap(),
@@ -122,7 +122,7 @@ StructDataType::createFieldValue() const
}
const Field&
-StructDataType::getField(vespalib::stringref name) const
+StructDataType::getField(vespalib::stringref name) const
{
StringFieldMap::const_iterator it(_nameFieldMap.find(name));
if (it == _nameFieldMap.end()) {
diff --git a/document/src/vespa/document/datatype/structdatatype.h b/document/src/vespa/document/datatype/structdatatype.h
index 5dc39639831..4491ed68e01 100644
--- a/document/src/vespa/document/datatype/structdatatype.h
+++ b/document/src/vespa/document/datatype/structdatatype.h
@@ -48,7 +48,7 @@ public:
void print(std::ostream&, bool verbose, const std::string& indent) const override;
uint32_t getFieldCount() const override { return _idFieldMap.size(); }
- const Field& getField(vespalib::stringref name) const override;
+ const Field& getField(vespalib::stringref name) const override;
/**
* Retrieves a field based on its ID. To determine which ID to use, we also
diff --git a/document/src/vespa/document/datatype/structureddatatype.h b/document/src/vespa/document/datatype/structureddatatype.h
index 5cd9804bd64..e940629553f 100644
--- a/document/src/vespa/document/datatype/structureddatatype.h
+++ b/document/src/vespa/document/datatype/structureddatatype.h
@@ -20,17 +20,17 @@ class StructuredDataType : public DataType {
protected:
StructuredDataType();
- StructuredDataType(vespalib::stringref name);
- StructuredDataType(vespalib::stringref name, int32_t dataTypeId);
+ StructuredDataType(vespalib::stringref name);
+ StructuredDataType(vespalib::stringref name, int32_t dataTypeId);
public:
virtual uint32_t getFieldCount() const = 0;
/** @throws FieldNotFoundException if field does not exist. */
- virtual const Field& getField(vespalib::stringref name) const = 0;
+ virtual const Field& getField(vespalib::stringref name) const = 0;
- virtual bool hasField(vespalib::stringref name) const = 0;
+ virtual bool hasField(vespalib::stringref name) const = 0;
virtual bool hasField(int32_t fieldId) const = 0;
virtual Field::Set getFieldSet() const = 0;
diff --git a/document/src/vespa/document/fieldset/fieldsetrepo.cpp b/document/src/vespa/document/fieldset/fieldsetrepo.cpp
index 0f30a70d766..aa14cfc2b80 100644
--- a/document/src/vespa/document/fieldset/fieldsetrepo.cpp
+++ b/document/src/vespa/document/fieldset/fieldsetrepo.cpp
@@ -13,7 +13,7 @@ namespace document {
namespace {
FieldSet::UP
-parseSpecialValues(vespalib::stringref name)
+parseSpecialValues(vespalib::stringref name)
{
FieldSet::UP fs;
if ((name.size() == 4) && (name[1] == 'i') && (name[2] == 'd') && (name[3] == ']')) {
diff --git a/document/src/vespa/document/fieldvalue/collectionfieldvalue.h b/document/src/vespa/document/fieldvalue/collectionfieldvalue.h
index bc4950793a4..050708475dd 100644
--- a/document/src/vespa/document/fieldvalue/collectionfieldvalue.h
+++ b/document/src/vespa/document/fieldvalue/collectionfieldvalue.h
@@ -64,7 +64,7 @@ public:
// Convenience functions for using primitives directly
- bool add(vespalib::stringref val)
+ bool add(vespalib::stringref val)
{ return addValue(*createNested() = val); }
bool add(int32_t val)
{ return addValue(*createNested() = val); }
@@ -75,7 +75,7 @@ public:
bool add(double val)
{ return addValue(*createNested() = val); }
- bool contains(vespalib::stringref val)
+ bool contains(vespalib::stringref val)
{ return containsValue(*createNested() = val); }
bool contains(int32_t val)
{ return containsValue(*createNested() = val); }
@@ -86,7 +86,7 @@ public:
bool contains(double val)
{ return containsValue(*createNested() = val); }
- bool remove(vespalib::stringref val)
+ bool remove(vespalib::stringref val)
{ return removeValue(*createNested() = val); }
bool remove(int32_t val)
{ return removeValue(*createNested() = val); }
diff --git a/document/src/vespa/document/fieldvalue/document.cpp b/document/src/vespa/document/fieldvalue/document.cpp
index b2cae1613de..7acc7e97be9 100644
--- a/document/src/vespa/document/fieldvalue/document.cpp
+++ b/document/src/vespa/document/fieldvalue/document.cpp
@@ -28,10 +28,10 @@ bool isLegalVersion(uint16_t version) {
return (6 <= version) && (version <= 8);
}
-void documentTypeError(vespalib::stringref name) __attribute__((noinline));
+void documentTypeError(vespalib::stringref name) __attribute__((noinline));
void throwTypeMismatch(vespalib::stringref type, vespalib::stringref docidType) __attribute__((noinline));
-void documentTypeError(vespalib::stringref name) {
+void documentTypeError(vespalib::stringref name) {
throw IllegalArgumentException(make_string("Cannot generate a document with non-document type %s.",
vespalib::string(name).c_str()), VESPA_STRLOC);
}
diff --git a/document/src/vespa/document/fieldvalue/document.h b/document/src/vespa/document/fieldvalue/document.h
index b5e2643ce80..ebbe01958b8 100644
--- a/document/src/vespa/document/fieldvalue/document.h
+++ b/document/src/vespa/document/fieldvalue/document.h
@@ -79,8 +79,8 @@ public:
const StructFieldValue& getFields() const { return _fields; }
StructFieldValue& getFields() { return _fields; }
- const Field& getField(vespalib::stringref name) const override { return _fields.getField(name); }
- bool hasField(vespalib::stringref name) const override { return _fields.hasField(name); }
+ const Field& getField(vespalib::stringref name) const override { return _fields.getField(name); }
+ bool hasField(vespalib::stringref name) const override { return _fields.hasField(name); }
void clear() override;
diff --git a/document/src/vespa/document/fieldvalue/literalfieldvalue.cpp b/document/src/vespa/document/fieldvalue/literalfieldvalue.cpp
index 0ae1e5fa0dd..c1c11df30f3 100644
--- a/document/src/vespa/document/fieldvalue/literalfieldvalue.cpp
+++ b/document/src/vespa/document/fieldvalue/literalfieldvalue.cpp
@@ -91,7 +91,7 @@ print(std::ostream& out, bool, const std::string&) const
}
FieldValue&
-LiteralFieldValueB::operator=(vespalib::stringref value)
+LiteralFieldValueB::operator=(vespalib::stringref value)
{
setValue(value);
return *this;
diff --git a/document/src/vespa/document/fieldvalue/numericfieldvalue.hpp b/document/src/vespa/document/fieldvalue/numericfieldvalue.hpp
index cba0e587a94..90c93e7a944 100644
--- a/document/src/vespa/document/fieldvalue/numericfieldvalue.hpp
+++ b/document/src/vespa/document/fieldvalue/numericfieldvalue.hpp
@@ -78,7 +78,7 @@ NumericFieldValue<Number>::print(std::ostream& out, bool, const std::string&) co
template<typename Number>
FieldValue&
-NumericFieldValue<Number>::operator=(vespalib::stringref value)
+NumericFieldValue<Number>::operator=(vespalib::stringref value)
{
// Lexical cast doesn't allow hex syntax we use in XML,
// so detect these in front.
diff --git a/document/src/vespa/document/fieldvalue/structfieldvalue.cpp b/document/src/vespa/document/fieldvalue/structfieldvalue.cpp
index febd0dc355c..f2e2896d9c3 100644
--- a/document/src/vespa/document/fieldvalue/structfieldvalue.cpp
+++ b/document/src/vespa/document/fieldvalue/structfieldvalue.cpp
@@ -159,13 +159,13 @@ StructFieldValue::getRawFieldIds(vector<int> &raw_ids,
}
bool
-StructFieldValue::hasField(vespalib::stringref name) const
+StructFieldValue::hasField(vespalib::stringref name) const
{
return getStructType().hasField(name);
}
const Field&
-StructFieldValue::getField(vespalib::stringref name) const
+StructFieldValue::getField(vespalib::stringref name) const
{
return getStructType().getField(name);
}
diff --git a/document/src/vespa/document/fieldvalue/structfieldvalue.h b/document/src/vespa/document/fieldvalue/structfieldvalue.h
index 3f21feafcbb..8025365be26 100644
--- a/document/src/vespa/document/fieldvalue/structfieldvalue.h
+++ b/document/src/vespa/document/fieldvalue/structfieldvalue.h
@@ -83,8 +83,8 @@ public:
void accept(FieldValueVisitor &visitor) override { visitor.visit(*this); }
void accept(ConstFieldValueVisitor &visitor) const override { visitor.visit(*this); }
- bool hasField(vespalib::stringref name) const override;
- const Field& getField(vespalib::stringref name) const override;
+ bool hasField(vespalib::stringref name) const override;
+ const Field& getField(vespalib::stringref name) const override;
void clear() override;
const CompressionConfig &getCompressionConfig() const;
diff --git a/document/src/vespa/document/fieldvalue/structuredfieldvalue.cpp b/document/src/vespa/document/fieldvalue/structuredfieldvalue.cpp
index 8ed13104dd6..273c0290684 100644
--- a/document/src/vespa/document/fieldvalue/structuredfieldvalue.cpp
+++ b/document/src/vespa/document/fieldvalue/structuredfieldvalue.cpp
@@ -244,12 +244,12 @@ StructuredFieldValue::commitTransaction() {
}
using ConstCharP = const char *;
-template void StructuredFieldValue::set(vespalib::stringref field, int32_t value);
-template void StructuredFieldValue::set(vespalib::stringref field, int64_t value);
-template void StructuredFieldValue::set(vespalib::stringref field, double value);
-template void StructuredFieldValue::set(vespalib::stringref field, ConstCharP value);
-template void StructuredFieldValue::set(vespalib::stringref field, vespalib::stringref value);
-template void StructuredFieldValue::set(vespalib::stringref field, vespalib::string value);
+template void StructuredFieldValue::set(vespalib::stringref field, int32_t value);
+template void StructuredFieldValue::set(vespalib::stringref field, int64_t value);
+template void StructuredFieldValue::set(vespalib::stringref field, double value);
+template void StructuredFieldValue::set(vespalib::stringref field, ConstCharP value);
+template void StructuredFieldValue::set(vespalib::stringref field, vespalib::stringref value);
+template void StructuredFieldValue::set(vespalib::stringref field, vespalib::string value);
template std::unique_ptr<MapFieldValue> StructuredFieldValue::getAs<MapFieldValue>(const Field &field) const;
template std::unique_ptr<ArrayFieldValue> StructuredFieldValue::getAs<ArrayFieldValue>(const Field &field) const;
diff --git a/document/src/vespa/document/fieldvalue/structuredfieldvalue.h b/document/src/vespa/document/fieldvalue/structuredfieldvalue.h
index b415596b292..b179c701816 100644
--- a/document/src/vespa/document/fieldvalue/structuredfieldvalue.h
+++ b/document/src/vespa/document/fieldvalue/structuredfieldvalue.h
@@ -112,12 +112,12 @@ public:
const DataType *getDataType() const override { return _type; }
/** Wrapper for DataType's hasField() function. */
- virtual bool hasField(vespalib::stringref name) const = 0;
+ virtual bool hasField(vespalib::stringref name) const = 0;
/**
* Wrapper for DataType's getField() function.
* @throws FieldNotFoundException If no field with given name exist.
*/
- virtual const Field& getField(vespalib::stringref name) const = 0;
+ virtual const Field& getField(vespalib::stringref name) const = 0;
void beginTransaction();
void commitTransaction();
@@ -136,7 +136,7 @@ public:
return getFieldValue(field);
}
/** @return Retrieve value of given field. Null pointer if not set. */
- FieldValue::UP getValue(vespalib::stringref name) const {
+ FieldValue::UP getValue(vespalib::stringref name) const {
return getFieldValue(getField(name));
}
/** @return True if value is set. */
@@ -159,16 +159,16 @@ public:
virtual void clear() = 0;
// Utility functions for easy but less efficient access
- bool hasValue(vespalib::stringref fieldName) const
+ bool hasValue(vespalib::stringref fieldName) const
{ return hasFieldValue(getField(fieldName)); }
- void remove(vespalib::stringref fieldName)
+ void remove(vespalib::stringref fieldName)
{ removeFieldValue(getField(fieldName)); }
- void setValue(vespalib::stringref fieldName, const FieldValue& value)
+ void setValue(vespalib::stringref fieldName, const FieldValue& value)
{ setFieldValue(getField(fieldName), value); }
template<typename PrimitiveType>
void set(const Field& field, PrimitiveType value);
template<typename PrimitiveType>
- void set(vespalib::stringref fieldName, PrimitiveType value);
+ void set(vespalib::stringref fieldName, PrimitiveType value);
size_t getSetFieldCount() const {
size_t count = 0;
diff --git a/document/src/vespa/document/fieldvalue/structuredfieldvalue.hpp b/document/src/vespa/document/fieldvalue/structuredfieldvalue.hpp
index 8d20cce9e66..41b285728b4 100644
--- a/document/src/vespa/document/fieldvalue/structuredfieldvalue.hpp
+++ b/document/src/vespa/document/fieldvalue/structuredfieldvalue.hpp
@@ -31,7 +31,7 @@ StructuredFieldValue::set(const Field& field, PrimitiveType value)
template<typename PrimitiveType>
void
-StructuredFieldValue::set(vespalib::stringref fieldName, PrimitiveType value)
+StructuredFieldValue::set(vespalib::stringref fieldName, PrimitiveType value)
{
set(getField(fieldName), value);
}
diff --git a/document/src/vespa/document/fieldvalue/weightedsetfieldvalue.h b/document/src/vespa/document/fieldvalue/weightedsetfieldvalue.h
index fafe8f15e0e..7865cd7e9fd 100644
--- a/document/src/vespa/document/fieldvalue/weightedsetfieldvalue.h
+++ b/document/src/vespa/document/fieldvalue/weightedsetfieldvalue.h
@@ -97,7 +97,7 @@ public:
// Utility functions for easy use of weighted sets of primitives
- bool add(vespalib::stringref val, int32_t weight = 1)
+ bool add(vespalib::stringref val, int32_t weight = 1)
{ return add(*createNested() = val, weight); }
bool add(int32_t val, int32_t weight = 1)
{ return add(*createNested() = val, weight); }
@@ -108,7 +108,7 @@ public:
bool add(double val, int32_t weight = 1)
{ return add(*createNested() = val, weight); }
- int32_t get(vespalib::stringref val) const
+ int32_t get(vespalib::stringref val) const
{ return get(*createNested() = val); }
int32_t get(int32_t val) const
{ return get(*createNested() = val); }
@@ -119,7 +119,7 @@ public:
int32_t get(double val) const
{ return get(*createNested() = val); }
- void increment(vespalib::stringref val, int32_t weight = 1)
+ void increment(vespalib::stringref val, int32_t weight = 1)
{ increment(*createNested() = val, weight); }
void increment(int32_t val, int32_t weight = 1)
{ increment(*createNested() = val, weight); }
@@ -130,7 +130,7 @@ public:
void increment(double val, int32_t weight = 1)
{ increment(*createNested() = val, weight); }
- void decrement(vespalib::stringref val, int32_t weight = 1)
+ void decrement(vespalib::stringref val, int32_t weight = 1)
{ decrement(*createNested() = val, weight); }
void decrement(int32_t val, int32_t weight = 1)
{ decrement(*createNested() = val, weight); }
diff --git a/document/src/vespa/document/select/branch.h b/document/src/vespa/document/select/branch.h
index 63c4cbe24d8..a750c2512f9 100644
--- a/document/src/vespa/document/select/branch.h
+++ b/document/src/vespa/document/select/branch.h
@@ -22,7 +22,7 @@ namespace select {
class Branch : public Node
{
public:
- Branch(vespalib::stringref name) : Node(name) {}
+ Branch(vespalib::stringref name) : Node(name) {}
bool isLeafNode() const override { return false; }
};
diff --git a/document/src/vespa/document/select/doctype.cpp b/document/src/vespa/document/select/doctype.cpp
index 3770a9a9da4..ba0338b9b61 100644
--- a/document/src/vespa/document/select/doctype.cpp
+++ b/document/src/vespa/document/select/doctype.cpp
@@ -24,7 +24,7 @@ namespace {
}
}
-DocType::DocType(vespalib::stringref doctype)
+DocType::DocType(vespalib::stringref doctype)
: Node("DocType"),
_doctype(doctype)
{
diff --git a/document/src/vespa/document/select/doctype.h b/document/src/vespa/document/select/doctype.h
index 160a3461746..e72f4c3b56d 100644
--- a/document/src/vespa/document/select/doctype.h
+++ b/document/src/vespa/document/select/doctype.h
@@ -23,7 +23,7 @@ private:
vespalib::string _doctype;
public:
- DocType(vespalib::stringref doctype);
+ DocType(vespalib::stringref doctype);
ResultList contains(const Context&) const override;
ResultList trace(const Context&, std::ostream& trace) const override;
diff --git a/document/src/vespa/document/select/invalidconstant.cpp b/document/src/vespa/document/select/invalidconstant.cpp
index e0b5e61e1ba..9327f7d1e87 100644
--- a/document/src/vespa/document/select/invalidconstant.cpp
+++ b/document/src/vespa/document/select/invalidconstant.cpp
@@ -6,7 +6,7 @@
namespace document::select {
-InvalidConstant::InvalidConstant(vespalib::stringref value)
+InvalidConstant::InvalidConstant(vespalib::stringref value)
: Node(value)
{ }
diff --git a/document/src/vespa/document/select/node.h b/document/src/vespa/document/select/node.h
index 24c0897ba95..1f5c78785d1 100644
--- a/document/src/vespa/document/select/node.h
+++ b/document/src/vespa/document/select/node.h
@@ -30,7 +30,7 @@ public:
typedef std::unique_ptr<Node> UP;
typedef std::shared_ptr<Node> SP;
- Node(vespalib::stringref name) : _name(name), _parentheses(false) {}
+ Node(vespalib::stringref name) : _name(name), _parentheses(false) {}
~Node() override {}
void setParentheses() { _parentheses = true; }
diff --git a/document/src/vespa/document/select/operator.cpp b/document/src/vespa/document/select/operator.cpp
index 4d3999b0fd8..1b97a375a5f 100644
--- a/document/src/vespa/document/select/operator.cpp
+++ b/document/src/vespa/document/select/operator.cpp
@@ -13,7 +13,7 @@ namespace document::select {
Operator::OperatorMap Operator::_operators;
-Operator::Operator(vespalib::stringref name)
+Operator::Operator(vespalib::stringref name)
: _name(name)
{
OperatorMap::iterator it = _operators.find(name);
@@ -24,7 +24,7 @@ Operator::Operator(vespalib::stringref name)
}
const Operator&
-Operator::get(vespalib::stringref name)
+Operator::get(vespalib::stringref name)
{
OperatorMap::iterator it = _operators.find(name);
if (it == _operators.end()) {
@@ -75,7 +75,7 @@ FunctionOperator::LT("<", &Value::operator<);
const FunctionOperator
FunctionOperator::NE("!=", &Value::operator!=);
-RegexOperator::RegexOperator(vespalib::stringref name)
+RegexOperator::RegexOperator(vespalib::stringref name)
: Operator(name)
{
}
@@ -133,7 +133,7 @@ RegexOperator::match(const vespalib::string& val, vespalib::stringref expr) cons
const RegexOperator RegexOperator::REGEX("=~");
-GlobOperator::GlobOperator(vespalib::stringref name)
+GlobOperator::GlobOperator(vespalib::stringref name)
: RegexOperator(name)
{
}
@@ -187,7 +187,7 @@ GlobOperator::traceImpl(const Value& a, const Value& b, std::ostream& ost) const
}
vespalib::string
-GlobOperator::convertToRegex(vespalib::stringref globpattern) const
+GlobOperator::convertToRegex(vespalib::stringref globpattern) const
{
vespalib::asciistream ost;
ost << '^';
@@ -219,7 +219,7 @@ GlobOperator::convertToRegex(vespalib::stringref globpattern) const
}
bool
-GlobOperator::containsVariables(vespalib::stringref expression)
+GlobOperator::containsVariables(vespalib::stringref expression)
{
for (size_t i=0, n=expression.size(); i<n; ++i) {
if (expression[i] == '*' || expression[i] == '?') {
diff --git a/document/src/vespa/document/select/operator.h b/document/src/vespa/document/select/operator.h
index de44fef628c..54ef82b01b2 100644
--- a/document/src/vespa/document/select/operator.h
+++ b/document/src/vespa/document/select/operator.h
@@ -25,7 +25,7 @@ private:
vespalib::string _name;
public:
- Operator(vespalib::stringref name);
+ Operator(vespalib::stringref name);
virtual ~Operator() {}
virtual ResultList compare(const Value&, const Value&) const = 0;
@@ -33,7 +33,7 @@ public:
std::ostream& trace) const = 0;
const vespalib::string& getName() const { return _name; }
- static const Operator& get(vespalib::stringref name);
+ static const Operator& get(vespalib::stringref name);
bool operator==(const Operator& op) const
{ return (_name == op._name); }
@@ -48,7 +48,7 @@ private:
ResultList (Value::*_comparator)(const Value&) const;
public:
- FunctionOperator(vespalib::stringref name,
+ FunctionOperator(vespalib::stringref name,
ResultList (Value::*comparator)(const Value&) const)
: Operator(name), _comparator(comparator) {}
@@ -65,7 +65,7 @@ public:
class RegexOperator : public Operator {
public:
- RegexOperator(vespalib::stringref name);
+ RegexOperator(vespalib::stringref name);
// Delegates to Value::regexCompare
ResultList compare(const Value& a, const Value& b) const override;
@@ -84,13 +84,13 @@ private:
class GlobOperator : public RegexOperator {
public:
- GlobOperator(vespalib::stringref name);
+ GlobOperator(vespalib::stringref name);
// Delegates to Value::globCompare
ResultList compare(const Value& a, const Value& b) const override;
ResultList trace(const Value&, const Value&, std::ostream& trace) const override;
- vespalib::string convertToRegex(vespalib::stringref globpattern) const;
- static bool containsVariables(vespalib::stringref expression);
+ vespalib::string convertToRegex(vespalib::stringref globpattern) const;
+ static bool containsVariables(vespalib::stringref expression);
static const GlobOperator GLOB;
private:
diff --git a/document/src/vespa/document/select/simpleparser.cpp b/document/src/vespa/document/select/simpleparser.cpp
index 3c8821271fb..a19d6086abe 100644
--- a/document/src/vespa/document/select/simpleparser.cpp
+++ b/document/src/vespa/document/select/simpleparser.cpp
@@ -21,7 +21,7 @@ bool icmp(char c, char l)
return tolower(c) == l;
}
-bool IdSpecParser::parse(vespalib::stringref s)
+bool IdSpecParser::parse(vespalib::stringref s)
{
bool retval(false);
size_t pos(eatWhite(s.data(), s.size()));
@@ -74,7 +74,7 @@ bool IdSpecParser::parse(vespalib::stringref s)
return retval;
}
-bool OperatorParser::parse(vespalib::stringref s)
+bool OperatorParser::parse(vespalib::stringref s)
{
bool retval(false);
size_t pos(eatWhite(s.data(), s.size()));
@@ -118,7 +118,7 @@ bool OperatorParser::parse(vespalib::stringref s)
return retval;
}
-bool StringParser::parse(vespalib::stringref s)
+bool StringParser::parse(vespalib::stringref s)
{
bool retval(false);
setRemaining(s);
@@ -143,7 +143,7 @@ bool StringParser::parse(vespalib::stringref s)
return retval;
}
-bool IntegerParser::parse(vespalib::stringref s)
+bool IntegerParser::parse(vespalib::stringref s)
{
bool retval(false);
size_t pos(eatWhite(s.data(), s.size()));
@@ -165,7 +165,7 @@ bool IntegerParser::parse(vespalib::stringref s)
return retval;
}
-bool SelectionParser::parse(vespalib::stringref s)
+bool SelectionParser::parse(vespalib::stringref s)
{
bool retval(false);
IdSpecParser id(_bucketIdFactory);
diff --git a/document/src/vespa/document/select/simpleparser.h b/document/src/vespa/document/select/simpleparser.h
index de537c4afa9..97264106913 100644
--- a/document/src/vespa/document/select/simpleparser.h
+++ b/document/src/vespa/document/select/simpleparser.h
@@ -11,10 +11,10 @@ namespace document::select::simple {
class Parser {
public:
virtual ~Parser() { }
- virtual bool parse(vespalib::stringref s) = 0;
+ virtual bool parse(vespalib::stringref s) = 0;
vespalib::stringref getRemaining() const { return _remaining; }
protected:
- void setRemaining(vespalib::stringref s) { _remaining = s; }
+ void setRemaining(vespalib::stringref s) { _remaining = s; }
private:
vespalib::stringref _remaining;
};
@@ -44,7 +44,7 @@ public:
IdSpecParser(const BucketIdFactory& bucketIdFactory) :
_bucketIdFactory(bucketIdFactory)
{}
- bool parse(vespalib::stringref s) override;
+ bool parse(vespalib::stringref s) override;
const IdValueNode & getId() const { return static_cast<const IdValueNode &>(getValue()); }
bool isUserSpec() const { return getId().getType() == IdValueNode::USER; }
private:
@@ -54,7 +54,7 @@ private:
class OperatorParser : public Parser
{
public:
- bool parse(vespalib::stringref s) override;
+ bool parse(vespalib::stringref s) override;
const Operator * getOperator() const { return _operator; }
private:
const Operator *_operator;
@@ -63,13 +63,13 @@ private:
class StringParser : public Parser, public ValueResult
{
public:
- bool parse(vespalib::stringref s) override;
+ bool parse(vespalib::stringref s) override;
};
class IntegerParser : public Parser, public ValueResult
{
public:
- bool parse(vespalib::stringref s) override;
+ bool parse(vespalib::stringref s) override;
};
class SelectionParser : public Parser, public NodeResult
@@ -78,7 +78,7 @@ public:
SelectionParser(const BucketIdFactory& bucketIdFactory) :
_bucketIdFactory(bucketIdFactory)
{}
- bool parse(vespalib::stringref s) override;
+ bool parse(vespalib::stringref s) override;
private:
const BucketIdFactory & _bucketIdFactory;
};
diff --git a/document/src/vespa/document/select/value.cpp b/document/src/vespa/document/select/value.cpp
index d6c94216bca..6b4bf15fc3b 100644
--- a/document/src/vespa/document/select/value.cpp
+++ b/document/src/vespa/document/select/value.cpp
@@ -96,7 +96,7 @@ NullValue::print(std::ostream& out, bool verbose,
out << "nil";
}
-StringValue::StringValue(vespalib::stringref val)
+StringValue::StringValue(vespalib::stringref val)
: Value(String),
_value(val)
{
diff --git a/document/src/vespa/document/select/value.h b/document/src/vespa/document/select/value.h
index f240f2ba5d7..2951117302e 100644
--- a/document/src/vespa/document/select/value.h
+++ b/document/src/vespa/document/select/value.h
@@ -91,7 +91,7 @@ class StringValue : public Value
vespalib::string _value;
public:
- StringValue(vespalib::stringref val);
+ StringValue(vespalib::stringref val);
const vespalib::string& getValue() const { return _value; }
ResultList operator<(const Value& value) const override;
diff --git a/document/src/vespa/document/select/valuenodes.cpp b/document/src/vespa/document/select/valuenodes.cpp
index 2ed147a1944..452d277874c 100644
--- a/document/src/vespa/document/select/valuenodes.cpp
+++ b/document/src/vespa/document/select/valuenodes.cpp
@@ -38,7 +38,7 @@ namespace {
}
}
-InvalidValueNode::InvalidValueNode(vespalib::stringref name)
+InvalidValueNode::InvalidValueNode(vespalib::stringref name)
: _name(name)
{ }
@@ -79,7 +79,7 @@ NullValueNode::print(std::ostream& out, bool verbose,
if (hadParentheses()) out << ')';
}
-StringValueNode::StringValueNode(vespalib::stringref val)
+StringValueNode::StringValueNode(vespalib::stringref val)
: _value(val)
{
}
@@ -686,7 +686,7 @@ namespace {
}
}
-FunctionValueNode::FunctionValueNode(vespalib::stringref name,
+FunctionValueNode::FunctionValueNode(vespalib::stringref name,
std::unique_ptr<ValueNode> src)
: _function(),
_funcname(name),
diff --git a/document/src/vespa/document/select/valuenodes.h b/document/src/vespa/document/select/valuenodes.h
index 0b412eaeb0f..0b7d23e1e30 100644
--- a/document/src/vespa/document/select/valuenodes.h
+++ b/document/src/vespa/document/select/valuenodes.h
@@ -19,7 +19,7 @@ class InvalidValueNode : public ValueNode
{
vespalib::string _name;
public:
- InvalidValueNode(vespalib::stringref name);
+ InvalidValueNode(vespalib::stringref name);
std::unique_ptr<Value> getValue(const Context&) const override {
return std::unique_ptr<Value>(new InvalidValue());
@@ -55,7 +55,7 @@ class StringValueNode : public ValueNode
{
vespalib::string _value;
public:
- explicit StringValueNode(vespalib::stringref val);
+ explicit StringValueNode(vespalib::stringref val);
const vespalib::string& getValue() const { return _value; }
@@ -280,7 +280,7 @@ class FunctionValueNode : public ValueNode
public:
enum Function { LOWERCASE, HASH, ABS };
- FunctionValueNode(vespalib::stringref name, std::unique_ptr<ValueNode> src);
+ FunctionValueNode(vespalib::stringref name, std::unique_ptr<ValueNode> src);
Function getFunction() const { return _function; }
const vespalib::string &getFunctionName(void) const { return _funcname; }
diff --git a/document/src/vespa/document/util/stringutil.cpp b/document/src/vespa/document/util/stringutil.cpp
index 60bc2516b77..e281a05c7e4 100644
--- a/document/src/vespa/document/util/stringutil.cpp
+++ b/document/src/vespa/document/util/stringutil.cpp
@@ -127,7 +127,7 @@ const vespalib::string & StringUtil::escape(const vespalib::string & source, ves
return source;
}
-vespalib::string StringUtil::unescape(vespalib::stringref source)
+vespalib::string StringUtil::unescape(vespalib::stringref source)
{
vespalib::asciistream ost;
for (unsigned int i=0; i<source.size(); ++i) {
diff --git a/document/src/vespa/document/util/stringutil.h b/document/src/vespa/document/util/stringutil.h
index afe942e2c62..999dd20cdc3 100644
--- a/document/src/vespa/document/util/stringutil.h
+++ b/document/src/vespa/document/util/stringutil.h
@@ -35,7 +35,7 @@ public:
* Unescape a string, replacing \\\\ \\n \\t \\f \\r or \\x## with their
* ascii value counterparts.
*/
- static vespalib::string unescape(vespalib::stringref source);
+ static vespalib::string unescape(vespalib::stringref source);
/**
* Print whatever source points to in a readable format.