aboutsummaryrefslogtreecommitdiffstats
path: root/storageapi
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 /storageapi
parentbb54ccd7a3422f9f3835d71dc71bded0a766fd88 (diff)
Pass stringref by value
Diffstat (limited to 'storageapi')
-rw-r--r--storageapi/src/vespa/storageapi/message/bucket.cpp2
-rw-r--r--storageapi/src/vespa/storageapi/message/bucket.h2
-rw-r--r--storageapi/src/vespa/storageapi/message/persistence.cpp2
-rw-r--r--storageapi/src/vespa/storageapi/message/persistence.h2
-rw-r--r--storageapi/src/vespa/storageapi/message/stat.cpp4
-rw-r--r--storageapi/src/vespa/storageapi/message/stat.h6
-rw-r--r--storageapi/src/vespa/storageapi/message/visitor.cpp6
-rw-r--r--storageapi/src/vespa/storageapi/message/visitor.h6
-rw-r--r--storageapi/src/vespa/storageapi/messageapi/returncode.cpp2
-rw-r--r--storageapi/src/vespa/storageapi/messageapi/returncode.h2
10 files changed, 17 insertions, 17 deletions
diff --git a/storageapi/src/vespa/storageapi/message/bucket.cpp b/storageapi/src/vespa/storageapi/message/bucket.cpp
index afceac0f78d..ee8aff31914 100644
--- a/storageapi/src/vespa/storageapi/message/bucket.cpp
+++ b/storageapi/src/vespa/storageapi/message/bucket.cpp
@@ -453,7 +453,7 @@ RequestBucketInfoCommand::RequestBucketInfoCommand(
RequestBucketInfoCommand::RequestBucketInfoCommand(
document::BucketSpace bucketSpace,
uint16_t distributor, const lib::ClusterState& state,
- const vespalib::stringref & distributionHash)
+ vespalib::stringref distributionHash)
: StorageCommand(MessageType::REQUESTBUCKETINFO),
_bucketSpace(bucketSpace),
_buckets(),
diff --git a/storageapi/src/vespa/storageapi/message/bucket.h b/storageapi/src/vespa/storageapi/message/bucket.h
index c0f65a0006a..f6185d9f8e7 100644
--- a/storageapi/src/vespa/storageapi/message/bucket.h
+++ b/storageapi/src/vespa/storageapi/message/bucket.h
@@ -349,7 +349,7 @@ public:
RequestBucketInfoCommand(document::BucketSpace bucketSpace,
uint16_t distributor,
const lib::ClusterState& state,
- const vespalib::stringref & _distributionHash);
+ vespalib::stringref _distributionHash);
RequestBucketInfoCommand(document::BucketSpace bucketSpace,
uint16_t distributor,
diff --git a/storageapi/src/vespa/storageapi/message/persistence.cpp b/storageapi/src/vespa/storageapi/message/persistence.cpp
index c1db27b4c1a..0b641eea253 100644
--- a/storageapi/src/vespa/storageapi/message/persistence.cpp
+++ b/storageapi/src/vespa/storageapi/message/persistence.cpp
@@ -176,7 +176,7 @@ UpdateReply::print(std::ostream& out, bool verbose, const std::string& indent) c
}
GetCommand::GetCommand(const document::Bucket &bucket, const document::DocumentId& docId,
- const vespalib::stringref & fieldSet, Timestamp before)
+ vespalib::stringref fieldSet, Timestamp before)
: BucketInfoCommand(MessageType::GET, bucket),
_docId(docId),
_beforeTimestamp(before),
diff --git a/storageapi/src/vespa/storageapi/message/persistence.h b/storageapi/src/vespa/storageapi/message/persistence.h
index c27264624b7..d352b2a5e94 100644
--- a/storageapi/src/vespa/storageapi/message/persistence.h
+++ b/storageapi/src/vespa/storageapi/message/persistence.h
@@ -188,7 +188,7 @@ class GetCommand : public BucketInfoCommand {
public:
GetCommand(const document::Bucket &bucket, const document::DocumentId&,
- const vespalib::stringref & fieldSet, Timestamp before = MAX_TIMESTAMP);
+ vespalib::stringref fieldSet, Timestamp before = MAX_TIMESTAMP);
~GetCommand() override;
void setBeforeTimestamp(Timestamp ts) { _beforeTimestamp = ts; }
const document::DocumentId& getDocumentId() const { return _docId; }
diff --git a/storageapi/src/vespa/storageapi/message/stat.cpp b/storageapi/src/vespa/storageapi/message/stat.cpp
index b061be885ff..a971aa0c4d5 100644
--- a/storageapi/src/vespa/storageapi/message/stat.cpp
+++ b/storageapi/src/vespa/storageapi/message/stat.cpp
@@ -12,7 +12,7 @@ IMPLEMENT_COMMAND(GetBucketListCommand, GetBucketListReply)
IMPLEMENT_REPLY(GetBucketListReply)
StatBucketCommand::StatBucketCommand(const document::Bucket& bucket,
- const vespalib::stringref & documentSelection)
+ vespalib::stringref documentSelection)
: BucketCommand(MessageType::STATBUCKET, bucket),
_docSelection(documentSelection)
{
@@ -33,7 +33,7 @@ StatBucketCommand::print(std::ostream& out, bool verbose,
}
StatBucketReply::StatBucketReply(const StatBucketCommand& cmd,
- const vespalib::stringref & results)
+ vespalib::stringref results)
: BucketReply(cmd),
_results(results)
{
diff --git a/storageapi/src/vespa/storageapi/message/stat.h b/storageapi/src/vespa/storageapi/message/stat.h
index 637c43255b8..9020d16622a 100644
--- a/storageapi/src/vespa/storageapi/message/stat.h
+++ b/storageapi/src/vespa/storageapi/message/stat.h
@@ -22,7 +22,7 @@ private:
vespalib::string _docSelection;
public:
StatBucketCommand(const document::Bucket &bucket,
- const vespalib::stringref & documentSelection);
+ vespalib::stringref documentSelection);
~StatBucketCommand();
const vespalib::string& getDocumentSelection() const { return _docSelection; }
@@ -33,7 +33,7 @@ public:
class StatBucketReply : public BucketReply {
vespalib::string _results;
public:
- StatBucketReply(const StatBucketCommand&, const vespalib::stringref & results = "");
+ StatBucketReply(const StatBucketCommand&, vespalib::stringref results = "");
const vespalib::string& getResults() { return _results; }
void print(std::ostream& out, bool verbose, const std::string& indent) const override;
DECLARE_STORAGEREPLY(StatBucketReply, onStatBucketReply)
@@ -63,7 +63,7 @@ public:
vespalib::string _bucketInformation;
BucketInfo(const document::BucketId& id,
- const vespalib::stringref & bucketInformation)
+ vespalib::stringref bucketInformation)
: _bucket(id),
_bucketInformation(bucketInformation)
{}
diff --git a/storageapi/src/vespa/storageapi/message/visitor.cpp b/storageapi/src/vespa/storageapi/message/visitor.cpp
index 2597b818d10..658e3d22ca3 100644
--- a/storageapi/src/vespa/storageapi/message/visitor.cpp
+++ b/storageapi/src/vespa/storageapi/message/visitor.cpp
@@ -14,9 +14,9 @@ IMPLEMENT_COMMAND(VisitorInfoCommand, VisitorInfoReply)
IMPLEMENT_REPLY(VisitorInfoReply)
CreateVisitorCommand::CreateVisitorCommand(document::BucketSpace bucketSpace,
- const vespalib::stringref & libraryName,
- const vespalib::stringref & instanceId,
- const vespalib::stringref & docSelection)
+ vespalib::stringref libraryName,
+ vespalib::stringref instanceId,
+ vespalib::stringref docSelection)
: StorageCommand(MessageType::VISITOR_CREATE),
_bucketSpace(bucketSpace),
_libName(libraryName),
diff --git a/storageapi/src/vespa/storageapi/message/visitor.h b/storageapi/src/vespa/storageapi/message/visitor.h
index c1dc65a23d6..696d8962256 100644
--- a/storageapi/src/vespa/storageapi/message/visitor.h
+++ b/storageapi/src/vespa/storageapi/message/visitor.h
@@ -54,9 +54,9 @@ private:
public:
CreateVisitorCommand(document::BucketSpace bucketSpace,
- const vespalib::stringref & libraryName,
- const vespalib::stringref & instanceId,
- const vespalib::stringref & docSelection);
+ vespalib::stringref libraryName,
+ vespalib::stringref instanceId,
+ vespalib::stringref docSelection);
/** Create another command with similar visitor settings. */
CreateVisitorCommand(const CreateVisitorCommand& template_);
diff --git a/storageapi/src/vespa/storageapi/messageapi/returncode.cpp b/storageapi/src/vespa/storageapi/messageapi/returncode.cpp
index 79a768541b9..68fbca75393 100644
--- a/storageapi/src/vespa/storageapi/messageapi/returncode.cpp
+++ b/storageapi/src/vespa/storageapi/messageapi/returncode.cpp
@@ -16,7 +16,7 @@ ReturnCode & ReturnCode::operator = (const ReturnCode &) = default;
ReturnCode & ReturnCode::operator = (ReturnCode &&) = default;
ReturnCode::~ReturnCode() {}
-ReturnCode::ReturnCode(Result result, const vespalib::stringref & msg)
+ReturnCode::ReturnCode(Result result, vespalib::stringref msg)
: _result(result),
_message(msg)
{}
diff --git a/storageapi/src/vespa/storageapi/messageapi/returncode.h b/storageapi/src/vespa/storageapi/messageapi/returncode.h
index 6e2aa79f09f..23c16c85c5e 100644
--- a/storageapi/src/vespa/storageapi/messageapi/returncode.h
+++ b/storageapi/src/vespa/storageapi/messageapi/returncode.h
@@ -73,7 +73,7 @@ private:
public:
ReturnCode();
- explicit ReturnCode(Result result, const vespalib::stringref & msg = "");
+ explicit ReturnCode(Result result, vespalib::stringref msg = "");
ReturnCode(const document::DocumentTypeRepo &repo,
document::ByteBuffer& buffer);
ReturnCode(const ReturnCode &);