summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2023-02-08 10:53:11 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2023-02-08 10:53:11 +0000
commit4de586e0b9205501ac56d64f714413bd9853a307 (patch)
tree842f39d4af398974ccc68131f65903e23d698323
parentfe1137423f89905fbefdb41d05f38e17b8ff1a63 (diff)
Move the strings
-rw-r--r--storage/src/vespa/storage/distributor/pendingclusterstate.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/storage/src/vespa/storage/distributor/pendingclusterstate.cpp b/storage/src/vespa/storage/distributor/pendingclusterstate.cpp
index a0607933d37..36f7af1c1e6 100644
--- a/storage/src/vespa/storage/distributor/pendingclusterstate.cpp
+++ b/storage/src/vespa/storage/distributor/pendingclusterstate.cpp
@@ -210,11 +210,10 @@ PendingClusterState::requestNode(BucketSpaceAndNode bucketSpaceAndNode)
}
-PendingClusterState::Summary::Summary(const std::string& prevClusterState,
- const std::string& newClusterState,
+PendingClusterState::Summary::Summary(std::string prevClusterState, std::string newClusterState,
vespalib::duration processingTime)
- : _prevClusterState(prevClusterState),
- _newClusterState(newClusterState),
+ : _prevClusterState(std::move(prevClusterState)),
+ _newClusterState(std::move(newClusterState)),
_processingTime(processingTime)
{}
@@ -304,9 +303,9 @@ PendingClusterState::printXml(vespalib::XmlOutputStream& xos) const
PendingClusterState::Summary
PendingClusterState::getSummary() const
{
- return Summary(getPrevClusterStateBundleString(),
- getNewClusterStateBundleString(),
- _clock.getSystemTime().time_since_epoch() - std::chrono::microseconds(_creationTimestamp));
+ return {getPrevClusterStateBundleString(),
+ getNewClusterStateBundleString(),
+ _clock.getSystemTime().time_since_epoch() - std::chrono::microseconds(_creationTimestamp)};
}
PendingBucketSpaceDbTransition&