summaryrefslogtreecommitdiffstats
path: root/searchsummary
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@oath.com>2018-08-11 00:36:04 +0200
committerHenning Baldersheim <balder@oath.com>2018-08-11 00:36:04 +0200
commit9bc10130d366f8a63549446cd730c739a9cc5a0c (patch)
treede2432a14bce2dc5f0f298c8b8aac38698338668 /searchsummary
parentbb54ccd7a3422f9f3835d71dc71bded0a766fd88 (diff)
Pass stringref by value
Diffstat (limited to 'searchsummary')
-rw-r--r--searchsummary/src/vespa/searchsummary/docsummary/dynamicteaserdfw.cpp2
-rw-r--r--searchsummary/src/vespa/searchsummary/docsummary/itokenizer.h4
-rw-r--r--searchsummary/src/vespa/searchsummary/docsummary/summaryfeaturesdfw.cpp2
-rw-r--r--searchsummary/src/vespa/searchsummary/docsummary/summaryfeaturesdfw.h2
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