diff options
author | Henning Baldersheim <balder@oath.com> | 2018-08-28 15:33:37 +0200 |
---|---|---|
committer | Henning Baldersheim <balder@oath.com> | 2018-08-28 15:33:37 +0200 |
commit | 7b6562b9b1e9da14386118826e7936ff5b8b5788 (patch) | |
tree | 07e0f98175dae74dd90120ff94d023aa7d72e617 /searchcore | |
parent | 60d9e3beca7ebeca83ac5fd96f1950ba4578bfc9 (diff) |
shared_ptr -> unique_ptr
Diffstat (limited to 'searchcore')
9 files changed, 10 insertions, 10 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/attribute/attributemanager.cpp b/searchcore/src/vespa/searchcore/proton/attribute/attributemanager.cpp index 394e5f4fff4..176c9e67608 100644 --- a/searchcore/src/vespa/searchcore/proton/attribute/attributemanager.cpp +++ b/searchcore/src/vespa/searchcore/proton/attribute/attributemanager.cpp @@ -456,7 +456,7 @@ public: _ctx.releaseEnumGuards(); _importedCtx.releaseEnumGuards(); } - void asyncForAttribute(const vespalib::string &name, std::shared_ptr<IAttributeFunctor> func) const override { + void asyncForAttribute(const vespalib::string &name, std::unique_ptr<IAttributeFunctor> func) const override { _ctx.asyncForAttribute(name, std::move(func)); } }; @@ -586,7 +586,7 @@ AttributeManager::asyncForEachAttribute(std::shared_ptr<IAttributeFunctor> func) } void -AttributeManager::asyncForAttribute(const vespalib::string &name, std::shared_ptr<IAttributeFunctor> func) const { +AttributeManager::asyncForAttribute(const vespalib::string &name, std::unique_ptr<IAttributeFunctor> func) const { AttributeMap::const_iterator itr = _attributes.find(name); if (itr == _attributes.end() || itr->second.isExtra() || !func) { return; diff --git a/searchcore/src/vespa/searchcore/proton/attribute/attributemanager.h b/searchcore/src/vespa/searchcore/proton/attribute/attributemanager.h index 78760d466e8..9690fdcbdfe 100644 --- a/searchcore/src/vespa/searchcore/proton/attribute/attributemanager.h +++ b/searchcore/src/vespa/searchcore/proton/attribute/attributemanager.h @@ -171,7 +171,7 @@ public: const std::vector<search::AttributeVector *> &getWritableAttributes() const override; void asyncForEachAttribute(std::shared_ptr<IAttributeFunctor> func) const override; - void asyncForAttribute(const vespalib::string &name, std::shared_ptr<IAttributeFunctor> func) const override; + void asyncForAttribute(const vespalib::string &name, std::unique_ptr<IAttributeFunctor> func) const override; ExclusiveAttributeReadAccessor::UP getExclusiveReadAccessor(const vespalib::string &name) const override; diff --git a/searchcore/src/vespa/searchcore/proton/attribute/filter_attribute_manager.cpp b/searchcore/src/vespa/searchcore/proton/attribute/filter_attribute_manager.cpp index 8100333397c..47a11b1c98d 100644 --- a/searchcore/src/vespa/searchcore/proton/attribute/filter_attribute_manager.cpp +++ b/searchcore/src/vespa/searchcore/proton/attribute/filter_attribute_manager.cpp @@ -201,7 +201,7 @@ FilterAttributeManager::asyncForEachAttribute(std::shared_ptr<IAttributeFunctor> } void -FilterAttributeManager::asyncForAttribute(const vespalib::string &name, std::shared_ptr<IAttributeFunctor> func) const { +FilterAttributeManager::asyncForAttribute(const vespalib::string &name, std::unique_ptr<IAttributeFunctor> func) const { AttributeGuard::UP attr = _mgr->getAttribute(name); if (!attr) { return; } search::ISequencedTaskExecutor &attributeFieldWriter = getAttributeFieldWriter(); diff --git a/searchcore/src/vespa/searchcore/proton/attribute/filter_attribute_manager.h b/searchcore/src/vespa/searchcore/proton/attribute/filter_attribute_manager.h index 918432ddcd7..12e88157075 100644 --- a/searchcore/src/vespa/searchcore/proton/attribute/filter_attribute_manager.h +++ b/searchcore/src/vespa/searchcore/proton/attribute/filter_attribute_manager.h @@ -55,7 +55,7 @@ public: void setImportedAttributes(std::unique_ptr<ImportedAttributesRepo> attributes) override; const ImportedAttributesRepo *getImportedAttributes() const override; - void asyncForAttribute(const vespalib::string &name, std::shared_ptr<IAttributeFunctor> func) const override; + void asyncForAttribute(const vespalib::string &name, std::unique_ptr<IAttributeFunctor> func) const override; }; } // namespace proton diff --git a/searchcore/src/vespa/searchcore/proton/attribute/imported_attributes_context.cpp b/searchcore/src/vespa/searchcore/proton/attribute/imported_attributes_context.cpp index 92b4d70893d..3890b5f12e3 100644 --- a/searchcore/src/vespa/searchcore/proton/attribute/imported_attributes_context.cpp +++ b/searchcore/src/vespa/searchcore/proton/attribute/imported_attributes_context.cpp @@ -72,7 +72,7 @@ ImportedAttributesContext::releaseEnumGuards() } void -ImportedAttributesContext::asyncForAttribute(const vespalib::string &, std::shared_ptr<IAttributeFunctor> ) const { +ImportedAttributesContext::asyncForAttribute(const vespalib::string &, std::unique_ptr<IAttributeFunctor> ) const { throw std::runtime_error("proton::ImportedAttributesContext::asyncForAttribute should never be called."); } diff --git a/searchcore/src/vespa/searchcore/proton/attribute/imported_attributes_context.h b/searchcore/src/vespa/searchcore/proton/attribute/imported_attributes_context.h index 0c81a5c4688..a82096f0e30 100644 --- a/searchcore/src/vespa/searchcore/proton/attribute/imported_attributes_context.h +++ b/searchcore/src/vespa/searchcore/proton/attribute/imported_attributes_context.h @@ -52,7 +52,7 @@ public: void getAttributeList(std::vector<const IAttributeVector *> &list) const override; void releaseEnumGuards() override; - void asyncForAttribute(const vespalib::string &name, std::shared_ptr<IAttributeFunctor> func) const override; + void asyncForAttribute(const vespalib::string &name, std::unique_ptr<IAttributeFunctor> func) const override; }; } diff --git a/searchcore/src/vespa/searchcore/proton/matching/requestcontext.cpp b/searchcore/src/vespa/searchcore/proton/matching/requestcontext.cpp index c275337cc7e..07c672a3fe1 100644 --- a/searchcore/src/vespa/searchcore/proton/matching/requestcontext.cpp +++ b/searchcore/src/vespa/searchcore/proton/matching/requestcontext.cpp @@ -23,7 +23,7 @@ RequestContext::getAttributeStableEnum(const vespalib::string &name) const return _attributeContext.getAttributeStableEnum(name); } -void RequestContext::asyncForAttribute(const vespalib::string &name, std::shared_ptr<IAttributeFunctor> func) const { +void RequestContext::asyncForAttribute(const vespalib::string &name, std::unique_ptr<IAttributeFunctor> func) const { _attributeContext.asyncForAttribute(name, std::move(func)); } diff --git a/searchcore/src/vespa/searchcore/proton/matching/requestcontext.h b/searchcore/src/vespa/searchcore/proton/matching/requestcontext.h index 91e1e906e87..19e6331d14d 100644 --- a/searchcore/src/vespa/searchcore/proton/matching/requestcontext.h +++ b/searchcore/src/vespa/searchcore/proton/matching/requestcontext.h @@ -18,7 +18,7 @@ public: const Doom & getSoftDoom() const override { return _softDoom; } const search::attribute::IAttributeVector *getAttribute(const vespalib::string &name) const override; - void asyncForAttribute(const vespalib::string &name, std::shared_ptr<IAttributeFunctor> func) const override; + void asyncForAttribute(const vespalib::string &name, std::unique_ptr<IAttributeFunctor> func) const override; const search::attribute::IAttributeVector *getAttributeStableEnum(const vespalib::string &name) const override; private: diff --git a/searchcore/src/vespa/searchcore/proton/test/mock_attribute_manager.h b/searchcore/src/vespa/searchcore/proton/test/mock_attribute_manager.h index 874ea0c460d..e37fed4a9c6 100644 --- a/searchcore/src/vespa/searchcore/proton/test/mock_attribute_manager.h +++ b/searchcore/src/vespa/searchcore/proton/test/mock_attribute_manager.h @@ -75,7 +75,7 @@ public: const ImportedAttributesRepo *getImportedAttributes() const override { return _importedAttributes.get(); } - void asyncForAttribute(const vespalib::string & name, std::shared_ptr<IAttributeFunctor> func) const override { + void asyncForAttribute(const vespalib::string & name, std::unique_ptr<IAttributeFunctor> func) const override { _mock.asyncForAttribute(name, std::move(func)); } }; |