diff options
author | Henning Baldersheim <balder@oath.com> | 2018-08-11 00:36:04 +0200 |
---|---|---|
committer | Henning Baldersheim <balder@oath.com> | 2018-08-11 00:36:04 +0200 |
commit | 9bc10130d366f8a63549446cd730c739a9cc5a0c (patch) | |
tree | de2432a14bce2dc5f0f298c8b8aac38698338668 /searchsummary | |
parent | bb54ccd7a3422f9f3835d71dc71bded0a766fd88 (diff) |
Pass stringref by value
Diffstat (limited to 'searchsummary')
4 files changed, 5 insertions, 5 deletions
diff --git a/searchsummary/src/vespa/searchsummary/docsummary/dynamicteaserdfw.cpp b/searchsummary/src/vespa/searchsummary/docsummary/dynamicteaserdfw.cpp index 73c62db864c..4112afc1895 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/dynamicteaserdfw.cpp +++ b/searchsummary/src/vespa/searchsummary/docsummary/dynamicteaserdfw.cpp @@ -119,7 +119,7 @@ private: public: JuniperQueryAdapter(KeywordExtractor *kwExtractor, - const vespalib::stringref &buf, + vespalib::stringref buf, const search::fef::Properties *highlightTerms = NULL) : _kwExtractor(kwExtractor), _buf(buf), _highlightTerms(highlightTerms), _visitor(NULL) {} diff --git a/searchsummary/src/vespa/searchsummary/docsummary/itokenizer.h b/searchsummary/src/vespa/searchsummary/docsummary/itokenizer.h index 15a367761ec..e9fc3579f31 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/itokenizer.h +++ b/searchsummary/src/vespa/searchsummary/docsummary/itokenizer.h @@ -35,8 +35,8 @@ public: _text(textBegin, textEnd - textBegin), _stem(), _type(type) {} Token(const char * textBegin, const char * textEnd, const char * stemBegin, const char * stemEnd, Type type) : _text(textBegin, textEnd - textBegin), _stem(stemBegin, stemEnd - stemBegin), _type(type) {} - const vespalib::stringref & getText() const { return _text; } - const vespalib::stringref & getStem() const { return _stem; } + vespalib::stringref getText() const { return _text; } + vespalib::stringref getStem() const { return _stem; } bool hasStem() const { return _stem.data() != NULL; } Type getType() const { return _type; } }; diff --git a/searchsummary/src/vespa/searchsummary/docsummary/summaryfeaturesdfw.cpp b/searchsummary/src/vespa/searchsummary/docsummary/summaryfeaturesdfw.cpp index a5fb9bd8539..7cf1e65fbc0 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/summaryfeaturesdfw.cpp +++ b/searchsummary/src/vespa/searchsummary/docsummary/summaryfeaturesdfw.cpp @@ -79,7 +79,7 @@ SummaryFeaturesDFW::insertField(uint32_t docid, GeneralResult *, GetDocsumsState } } -void FeaturesDFW::featureDump(vespalib::JSONStringer & json, const vespalib::stringref & name, double feature) +void FeaturesDFW::featureDump(vespalib::JSONStringer & json, vespalib::stringref name, double feature) { json.appendKey(name); if (std::isnan(feature) || std::isinf(feature)) { diff --git a/searchsummary/src/vespa/searchsummary/docsummary/summaryfeaturesdfw.h b/searchsummary/src/vespa/searchsummary/docsummary/summaryfeaturesdfw.h index 5229e26475b..e417e89cf04 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/summaryfeaturesdfw.h +++ b/searchsummary/src/vespa/searchsummary/docsummary/summaryfeaturesdfw.h @@ -13,7 +13,7 @@ class IDocsumEnvironment; class FeaturesDFW : public IDocsumFieldWriter { protected: - void featureDump(vespalib::JSONStringer & json, const vespalib::stringref & name, double feature); + void featureDump(vespalib::JSONStringer & json, vespalib::stringref name, double feature); }; class SummaryFeaturesDFW : public FeaturesDFW |