diff options
author | Henning Baldersheim <balder@oath.com> | 2018-08-11 00:35:31 +0200 |
---|---|---|
committer | Henning Baldersheim <balder@oath.com> | 2018-08-11 00:35:31 +0200 |
commit | e198573919f269bf62bb7ff22c0fb5797375ef9c (patch) | |
tree | 33b1c2b551290c70d6647c6c5b313758e5fe950c /searchcommon | |
parent | 9f1d806d415b458b2139ce0cbf6b03a3ae979539 (diff) |
Pass stringref by value
Diffstat (limited to 'searchcommon')
-rw-r--r-- | searchcommon/src/vespa/searchcommon/common/schema.cpp | 6 | ||||
-rw-r--r-- | searchcommon/src/vespa/searchcommon/common/schema.h | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/searchcommon/src/vespa/searchcommon/common/schema.cpp b/searchcommon/src/vespa/searchcommon/common/schema.cpp index 775199694c0..31362c80a94 100644 --- a/searchcommon/src/vespa/searchcommon/common/schema.cpp +++ b/searchcommon/src/vespa/searchcommon/common/schema.cpp @@ -17,7 +17,7 @@ namespace { template <typename T> void writeFields(vespalib::asciistream & os, - const vespalib::stringref &prefix, + vespalib::stringref prefix, const std::vector<T> & fields) { os << prefix << "[" << fields.size() << "]\n"; @@ -100,7 +100,7 @@ Schema::Field::Field(const std::vector<vespalib::string> & lines) Schema::Field::~Field() { } void -Schema::Field::write(vespalib::asciistream & os, const vespalib::stringref & prefix) const +Schema::Field::write(vespalib::asciistream & os, vespalib::stringref prefix) const { os << prefix << "name " << _name << "\n"; os << prefix << "datatype " << getTypeName(_dataType) << "\n"; @@ -157,7 +157,7 @@ Schema::IndexField::IndexField(const std::vector<vespalib::string> &lines) } void -Schema::IndexField::write(vespalib::asciistream & os, const vespalib::stringref & prefix) const +Schema::IndexField::write(vespalib::asciistream & os, vespalib::stringref prefix) const { Field::write(os, prefix); os << prefix << "prefix " << (_prefix ? "true" : "false") << "\n"; diff --git a/searchcommon/src/vespa/searchcommon/common/schema.h b/searchcommon/src/vespa/searchcommon/common/schema.h index 52de8646cc1..6a1dc2827fa 100644 --- a/searchcommon/src/vespa/searchcommon/common/schema.h +++ b/searchcommon/src/vespa/searchcommon/common/schema.h @@ -52,7 +52,7 @@ public: virtual void write(vespalib::asciistream & os, - const vespalib::stringref & prefix) const; + vespalib::stringref prefix) const; const vespalib::string &getName() const { return _name; } DataType getDataType() const { return _dataType; } @@ -97,7 +97,7 @@ public: void write(vespalib::asciistream &os, - const vespalib::stringref &prefix) const override; + vespalib::stringref prefix) const override; bool hasPrefix() const { return _prefix; } bool hasPhrases() const { return _phrases; } |