From 66e2ce2885a9b1b80be76a65873c87d2dbad3676 Mon Sep 17 00:00:00 2001 From: Geir Storli Date: Tue, 19 Dec 2017 11:03:41 +0000 Subject: Simplify use of unique ptr. --- storage/src/vespa/storage/storageserver/storagenode.cpp | 12 ++++++------ 1 file 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 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 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 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 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 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 config) { { vespalib::LockGuard configLockGuard(_configLock); - _newBucketSpacesConfig.reset(config.release()); + _newBucketSpacesConfig = std::move(config); } if (_bucketSpacesConfig) { InitialGuard concurrent_config_guard(_initial_config_mutex); -- cgit v1.2.3