diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2023-02-08 10:53:11 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2023-02-08 10:53:11 +0000 |
commit | 4de586e0b9205501ac56d64f714413bd9853a307 (patch) | |
tree | 842f39d4af398974ccc68131f65903e23d698323 | |
parent | fe1137423f89905fbefdb41d05f38e17b8ff1a63 (diff) |
Move the strings
-rw-r--r-- | storage/src/vespa/storage/distributor/pendingclusterstate.cpp | 13 |
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& |