summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2020-08-18 20:27:33 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2020-08-18 20:27:33 +0000
commit623648364a8e32ff0ec811f2a8b0179bd13d5956 (patch)
tree8835fa7002c9f214fae86bc43fb7c753c3a6135e
parent729e8546d793a43ecfc94c11d5eed042d4dc74e1 (diff)
Avoid renaming a simple shared_ptr.
-rw-r--r--storage/src/vespa/storage/common/storagecomponent.cpp2
-rw-r--r--storage/src/vespa/storage/common/storagecomponent.h5
2 files changed, 3 insertions, 4 deletions
diff --git a/storage/src/vespa/storage/common/storagecomponent.cpp b/storage/src/vespa/storage/common/storagecomponent.cpp
index f7bf038f3de..3846fe3a9c0 100644
--- a/storage/src/vespa/storage/common/storagecomponent.cpp
+++ b/storage/src/vespa/storage/common/storagecomponent.cpp
@@ -122,7 +122,7 @@ StorageComponent::getPriority(const documentapi::LoadType& lt) const
return _priorityMapper->getPriority(lt);
}
-StorageComponent::DocumentTypeRepoSP
+std::shared_ptr<StorageComponent::Repos>
StorageComponent::getTypeRepo() const
{
std::lock_guard guard(_lock);
diff --git a/storage/src/vespa/storage/common/storagecomponent.h b/storage/src/vespa/storage/common/storagecomponent.h
index 4e5d65310e1..e0b1dc74d7f 100644
--- a/storage/src/vespa/storage/common/storagecomponent.h
+++ b/storage/src/vespa/storage/common/storagecomponent.h
@@ -67,7 +67,6 @@ public:
};
using UP = std::unique_ptr<StorageComponent>;
using PriorityConfig = vespa::config::content::core::internal::InternalStorPrioritymappingType;
- using DocumentTypeRepoSP = std::shared_ptr<Repos>;
using LoadTypeSetSP = std::shared_ptr<documentapi::LoadTypeSet>;
using DistributionSP = std::shared_ptr<lib::Distribution>;
@@ -99,7 +98,7 @@ public:
vespalib::string getIdentity() const;
- DocumentTypeRepoSP getTypeRepo() const;
+ std::shared_ptr<Repos> getTypeRepo() const;
LoadTypeSetSP getLoadTypes() const;
const document::BucketIdFactory& getBucketIdFactory() const
{ return _bucketIdFactory; }
@@ -111,7 +110,7 @@ private:
vespalib::string _clusterName;
const lib::NodeType* _nodeType;
uint16_t _index;
- DocumentTypeRepoSP _repos;
+ std::shared_ptr<Repos> _repos;
// TODO: move loadTypes and _distribution in to _repos so lock will only taken once and only copying one shared_ptr.
LoadTypeSetSP _loadTypes;
std::unique_ptr<PriorityMapper> _priorityMapper;