summaryrefslogtreecommitdiffstats
path: root/storage
diff options
context:
space:
mode:
authorGeir Storli <geirst@oath.com>2017-12-19 11:03:41 +0000
committerGeir Storli <geirst@oath.com>2017-12-19 11:03:41 +0000
commit66e2ce2885a9b1b80be76a65873c87d2dbad3676 (patch)
treeb235bf503616bd30c949b5e61c94f663a9c6cd00 /storage
parentfa4cd50bbe4a87b62ebc99cea99070eadbe1bae3 (diff)
Simplify use of unique ptr.
Diffstat (limited to 'storage')
-rw-r--r--storage/src/vespa/storage/storageserver/storagenode.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/storage/src/vespa/storage/storageserver/storagenode.cpp b/storage/src/vespa/storage/storageserver/storagenode.cpp
index 8f0ebccb26f..d60f46e5a07 100644
--- a/storage/src/vespa/storage/storageserver/storagenode.cpp
+++ b/storage/src/vespa/storage/storageserver/storagenode.cpp
@@ -464,7 +464,7 @@ void StorageNode::configure(std::unique_ptr<StorServerConfig> config)
// updates
{
vespalib::LockGuard configLockGuard(_configLock);
- _newServerConfig.reset(config.release());
+ _newServerConfig = std::move(config);
}
if (_serverConfig) {
InitialGuard concurrent_config_guard(_initial_config_mutex);
@@ -481,7 +481,7 @@ StorageNode::configure(std::unique_ptr<UpgradingConfig> config)
// updates
{
vespalib::LockGuard configLockGuard(_configLock);
- _newClusterConfig.reset(config.release());
+ _newClusterConfig = std::move(config);
}
if (_clusterConfig) {
InitialGuard concurrent_config_guard(_initial_config_mutex);
@@ -498,7 +498,7 @@ StorageNode::configure(std::unique_ptr<StorDistributionConfig> config)
// updates
{
vespalib::LockGuard configLockGuard(_configLock);
- _newDistributionConfig.reset(config.release());
+ _newDistributionConfig = std::move(config);
}
if (_distributionConfig) {
InitialGuard concurrent_config_guard(_initial_config_mutex);
@@ -511,7 +511,7 @@ StorageNode::configure(std::unique_ptr<StorPrioritymappingConfig> config)
{
{
vespalib::LockGuard configLockGuard(_configLock);
- _newPriorityConfig.reset(config.release());
+ _newPriorityConfig = std::move(config);
}
if (_priorityConfig) {
InitialGuard concurrent_config_guard(_initial_config_mutex);
@@ -528,7 +528,7 @@ StorageNode::configure(std::unique_ptr<document::DocumenttypesConfig> config,
return;
{
vespalib::LockGuard configLockGuard(_configLock);
- _newDoctypesConfig.reset(config.release());
+ _newDoctypesConfig = std::move(config);
}
if (_doctypesConfig) {
InitialGuard concurrent_config_guard(_initial_config_mutex);
@@ -541,7 +541,7 @@ StorageNode::configure(std::unique_ptr<BucketspacesConfig> config)
{
{
vespalib::LockGuard configLockGuard(_configLock);
- _newBucketSpacesConfig.reset(config.release());
+ _newBucketSpacesConfig = std::move(config);
}
if (_bucketSpacesConfig) {
InitialGuard concurrent_config_guard(_initial_config_mutex);