summaryrefslogtreecommitdiffstats
path: root/storage
diff options
context:
space:
mode:
authorGeir Storli <geirst@oath.com>2017-12-19 10:59:30 +0000
committerGeir Storli <geirst@oath.com>2017-12-19 10:59:30 +0000
commitfa4cd50bbe4a87b62ebc99cea99070eadbe1bae3 (patch)
tree624d258ac71fa249749c349448f1009337853a77 /storage
parent603b6931cbff7f596e0faa1cac2ededbf369f0bb (diff)
Utilize class template argument deduction (in C++17).
Diffstat (limited to 'storage')
-rw-r--r--storage/src/vespa/storage/common/storagecomponent.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/storage/src/vespa/storage/common/storagecomponent.cpp b/storage/src/vespa/storage/common/storagecomponent.cpp
index 3bf2beba0eb..1d6b563f6eb 100644
--- a/storage/src/vespa/storage/common/storagecomponent.cpp
+++ b/storage/src/vespa/storage/common/storagecomponent.cpp
@@ -28,14 +28,14 @@ StorageComponent::setNodeInfo(vespalib::stringref clusterName,
void
StorageComponent::setDocumentTypeRepo(DocumentTypeRepoSP repo)
{
- std::lock_guard<std::mutex> guard(_lock);
+ std::lock_guard guard(_lock);
_docTypeRepo = repo;
}
void
StorageComponent::setLoadTypes(LoadTypeSetSP loadTypes)
{
- std::lock_guard<std::mutex> guard(_lock);
+ std::lock_guard guard(_lock);
_loadTypes = loadTypes;
}
@@ -57,21 +57,21 @@ StorageComponent::setBucketIdFactory(const document::BucketIdFactory& factory)
void
StorageComponent::setDistribution(DistributionSP distribution)
{
- std::lock_guard<std::mutex> guard(_lock);
+ std::lock_guard guard(_lock);
_distribution = distribution;
}
void
StorageComponent::enableMultipleBucketSpaces(bool value)
{
- std::lock_guard<std::mutex> guard(_lock);
+ std::lock_guard guard(_lock);
_enableMultipleBucketSpaces = value;
}
void
StorageComponent::setNodeStateUpdater(NodeStateUpdater& updater)
{
- std::lock_guard<std::mutex> guard(_lock);
+ std::lock_guard guard(_lock);
if (_nodeStateUpdater != 0) {
throw vespalib::IllegalStateException(
"Node state updater is already set", VESPA_STRLOC);
@@ -100,7 +100,7 @@ StorageComponent::StorageComponent(StorageComponentRegister& compReg,
NodeStateUpdater&
StorageComponent::getStateUpdater() const
{
- std::lock_guard<std::mutex> guard(_lock);
+ std::lock_guard guard(_lock);
if (_nodeStateUpdater == 0) {
throw vespalib::IllegalStateException(
"Component need node state updater at this time, but it has "
@@ -127,28 +127,28 @@ StorageComponent::getPriority(const documentapi::LoadType& lt) const
StorageComponent::DocumentTypeRepoSP
StorageComponent::getTypeRepo() const
{
- std::lock_guard<std::mutex> guard(_lock);
+ std::lock_guard guard(_lock);
return _docTypeRepo;
}
StorageComponent::LoadTypeSetSP
StorageComponent::getLoadTypes() const
{
- std::lock_guard<std::mutex> guard(_lock);
+ std::lock_guard guard(_lock);
return _loadTypes;
}
StorageComponent::DistributionSP
StorageComponent::getDistribution() const
{
- std::lock_guard<std::mutex> guard(_lock);
+ std::lock_guard guard(_lock);
return _distribution;
}
bool
StorageComponent::enableMultipleBucketSpaces() const
{
- std::lock_guard<std::mutex> guard(_lock);
+ std::lock_guard guard(_lock);
return _enableMultipleBucketSpaces;
}