diff options
15 files changed, 18 insertions, 28 deletions
diff --git a/document/src/tests/document_type_repo_factory/document_type_repo_factory_test.cpp b/document/src/tests/document_type_repo_factory/document_type_repo_factory_test.cpp index 2cd10225edd..091bca5fa8a 100644 --- a/document/src/tests/document_type_repo_factory/document_type_repo_factory_test.cpp +++ b/document/src/tests/document_type_repo_factory/document_type_repo_factory_test.cpp @@ -2,7 +2,6 @@ #include <vespa/document/datatype/documenttype.h> #include <vespa/document/repo/configbuilder.h> -#include <vespa/document/repo/documenttyperepo.h> #include <vespa/document/repo/document_type_repo_factory.h> #include <vespa/vespalib/stllike/string.h> #include <vespa/vespalib/testkit/testapp.h> diff --git a/document/src/vespa/document/fieldvalue/structfieldvalue.cpp b/document/src/vespa/document/fieldvalue/structfieldvalue.cpp index 8f5e2d1dbe3..7f88229e1ba 100644 --- a/document/src/vespa/document/fieldvalue/structfieldvalue.cpp +++ b/document/src/vespa/document/fieldvalue/structfieldvalue.cpp @@ -193,7 +193,7 @@ StructFieldValue::getFieldValue(const Field& field) const nbostream stream(buf.c_str(), buf.size()); FieldValue::UP value(field.getDataType().createFieldValue()); if ((_repo == NULL) && (_doc_type != NULL)) { - DocumentTypeRepo::UP tmpRepo(new DocumentTypeRepo(*_doc_type)); + std::unique_ptr<const DocumentTypeRepo> tmpRepo(new DocumentTypeRepo(*_doc_type)); createFV(*value, *tmpRepo, stream, *_doc_type, _version); } else { createFV(*value, *_repo, stream, *_doc_type, _version); @@ -226,7 +226,7 @@ StructFieldValue::getFieldValue(const Field& field, FieldValue& value) const if (buf.size() > 0) { nbostream_longlivedbuf stream(buf.c_str(), buf.size()); if ((_repo == NULL) && (_doc_type != NULL)) { - DocumentTypeRepo::UP tmpRepo(new DocumentTypeRepo(*_doc_type)); + std::unique_ptr<const DocumentTypeRepo> tmpRepo(new DocumentTypeRepo(*_doc_type)); createFV(value, *tmpRepo, stream, *_doc_type, _version); } else { createFV(value, *_repo, stream, *_doc_type, _version); diff --git a/document/src/vespa/document/repo/documenttyperepo.h b/document/src/vespa/document/repo/documenttyperepo.h index ce54effe068..71410197405 100644 --- a/document/src/vespa/document/repo/documenttyperepo.h +++ b/document/src/vespa/document/repo/documenttyperepo.h @@ -23,7 +23,6 @@ class DocumentTypeRepo { public: using DocumenttypesConfig = const internal::InternalDocumenttypesType; - typedef std::unique_ptr<DocumentTypeRepo> UP; // This one should only be used for testing. If you do not have any config. explicit DocumentTypeRepo(const DocumentType & docType); diff --git a/document/src/vespa/document/serialization/vespadocumentserializer.cpp b/document/src/vespa/document/serialization/vespadocumentserializer.cpp index d8d18969070..919f02a5fee 100644 --- a/document/src/vespa/document/serialization/vespadocumentserializer.cpp +++ b/document/src/vespa/document/serialization/vespadocumentserializer.cpp @@ -21,7 +21,6 @@ #include <vespa/document/fieldvalue/tensorfieldvalue.h> #include <vespa/document/fieldvalue/referencefieldvalue.h> #include <vespa/document/datatype/weightedsetdatatype.h> -#include <vespa/document/repo/documenttyperepo.h> #include <vespa/document/update/updates.h> #include <vespa/document/update/fieldpathupdates.h> #include <vespa/vespalib/data/slime/binary_format.h> diff --git a/searchcore/src/tests/proton/common/cachedselect_test.cpp b/searchcore/src/tests/proton/common/cachedselect_test.cpp index ecd7a4efd94..7c295486110 100644 --- a/searchcore/src/tests/proton/common/cachedselect_test.cpp +++ b/searchcore/src/tests/proton/common/cachedselect_test.cpp @@ -88,7 +88,7 @@ const string body_name_2 = type_name_2 + ".body"; const int32_t noIntVal = std::numeric_limits<int32_t>::min(); -DocumentTypeRepo::UP +std::unique_ptr<const DocumentTypeRepo> makeDocTypeRepo() { DocumenttypesConfigBuilderHelper builder; @@ -113,7 +113,7 @@ makeDocTypeRepo() addField("id", DataType::T_STRING). addField("ac", DataType::T_INT). addField("ad", DataType::T_INT)); - return DocumentTypeRepo::UP(new DocumentTypeRepo(builder.config())); + return std::unique_ptr<const DocumentTypeRepo>(new DocumentTypeRepo(builder.config())); } @@ -289,7 +289,7 @@ MyDB::getDoc(uint32_t lid) const class TestFixture { public: - DocumentTypeRepo::UP _repoUP; + std::unique_ptr<const DocumentTypeRepo> _repoUP; bool _hasFields; MyAttributeManager _amgr; MyDB::UP _db; @@ -352,7 +352,7 @@ TestFixture::testParse(const string &selection, TEST_F("Test that test setup is OK", TestFixture) { - DocumentTypeRepo &repo = *f._repoUP; + const DocumentTypeRepo &repo = *f._repoUP; const DocumentType *docType = repo.getDocumentType("test"); ASSERT_TRUE(docType); EXPECT_EQUAL(10u, docType->getFieldCount()); diff --git a/searchcore/src/tests/proton/common/document_type_inspector/document_type_inspector_test.cpp b/searchcore/src/tests/proton/common/document_type_inspector/document_type_inspector_test.cpp index 4d714e5039f..2dbff7d40dd 100644 --- a/searchcore/src/tests/proton/common/document_type_inspector/document_type_inspector_test.cpp +++ b/searchcore/src/tests/proton/common/document_type_inspector/document_type_inspector_test.cpp @@ -14,7 +14,7 @@ const vespalib::string type_name = "test"; const vespalib::string header_name = type_name + ".header"; const vespalib::string body_name = type_name + ".body"; -DocumentTypeRepo::UP +std::unique_ptr<const DocumentTypeRepo> makeOldDocTypeRepo() { DocumenttypesConfigBuilderHelper builder; @@ -24,10 +24,10 @@ makeOldDocTypeRepo() addField("f2", DataType::T_STRING). addField("f3", DataType::T_STRING). addField("f4", DataType::T_STRING)); - return DocumentTypeRepo::UP(new DocumentTypeRepo(builder.config())); + return std::unique_ptr<const DocumentTypeRepo>(new DocumentTypeRepo(builder.config())); } -DocumentTypeRepo::UP +std::unique_ptr<const DocumentTypeRepo> makeNewDocTypeRepo() { DocumenttypesConfigBuilderHelper builder; @@ -37,13 +37,13 @@ makeNewDocTypeRepo() addField("f2", DataType::T_STRING). addField("f3", DataType::T_INT). addField("f5", DataType::T_STRING)); - return DocumentTypeRepo::UP(new DocumentTypeRepo(builder.config())); + return std::unique_ptr<const DocumentTypeRepo>(new DocumentTypeRepo(builder.config())); } struct Fixture { - DocumentTypeRepo::UP _oldRepo; - DocumentTypeRepo::UP _newRepo; + std::unique_ptr<const DocumentTypeRepo> _oldRepo; + std::unique_ptr<const DocumentTypeRepo> _newRepo; DocumentTypeInspector _inspector; Fixture() : _oldRepo(makeOldDocTypeRepo()), diff --git a/searchcore/src/tests/proton/common/selectpruner_test.cpp b/searchcore/src/tests/proton/common/selectpruner_test.cpp index 4ec5bb928f6..f5621f1c050 100644 --- a/searchcore/src/tests/proton/common/selectpruner_test.cpp +++ b/searchcore/src/tests/proton/common/selectpruner_test.cpp @@ -60,7 +60,7 @@ const string empty(""); const document::DocumentId docId("doc:test:1"); -DocumentTypeRepo::UP +std::unique_ptr<const DocumentTypeRepo> makeDocTypeRepo() { DocumenttypesConfigBuilderHelper builder; @@ -85,7 +85,7 @@ makeDocTypeRepo() addField("id", DataType::T_STRING). addField("ac", DataType::T_INT). addField("ad", DataType::T_INT)); - return DocumentTypeRepo::UP(new DocumentTypeRepo(builder.config())); + return std::unique_ptr<const DocumentTypeRepo>(new DocumentTypeRepo(builder.config())); } @@ -129,7 +129,7 @@ class TestFixture { public: MockAttributeManager _amgr; - DocumentTypeRepo::UP _repoUP; + std::unique_ptr<const DocumentTypeRepo> _repoUP; bool _hasFields; TestFixture(); @@ -292,7 +292,7 @@ TestFixture::testPrune(const string &selection, TEST_F("Test that test setup is OK", TestFixture) { - DocumentTypeRepo &repo = *f._repoUP; + const DocumentTypeRepo &repo = *f._repoUP; const DocumentType *docType = repo.getDocumentType("test"); ASSERT_TRUE(docType); EXPECT_EQUAL(10u, docType->getFieldCount()); diff --git a/searchcore/src/tests/proton/feedoperation/feedoperation_test.cpp b/searchcore/src/tests/proton/feedoperation/feedoperation_test.cpp index a43bbd050db..a6d7f12f199 100644 --- a/searchcore/src/tests/proton/feedoperation/feedoperation_test.cpp +++ b/searchcore/src/tests/proton/feedoperation/feedoperation_test.cpp @@ -94,7 +94,7 @@ void assertDocumentOperation(DocumentOperation &op, BucketId expBucket, uint32_t EXPECT_EQUAL(4u, op.getPrevLid()); } -DocumentTypeRepo::UP +std::unique_ptr<const DocumentTypeRepo> makeDocTypeRepo() { DocumenttypesConfigBuilderHelper builder; @@ -106,7 +106,7 @@ makeDocTypeRepo() addField("y", DataType::T_STRING)). addField("map", Map(DataType::T_STRING, DataType::T_STRING))); - return DocumentTypeRepo::UP(new DocumentTypeRepo(builder.config())); + return std::unique_ptr<const DocumentTypeRepo>(new DocumentTypeRepo(builder.config())); } diff --git a/searchcore/src/tests/proton/server/feedstates_test.cpp b/searchcore/src/tests/proton/server/feedstates_test.cpp index edb581347c6..dfa461e2b57 100644 --- a/searchcore/src/tests/proton/server/feedstates_test.cpp +++ b/searchcore/src/tests/proton/server/feedstates_test.cpp @@ -7,7 +7,6 @@ LOG_SETUP("feedstates_test"); #include <vespa/document/base/documentid.h> #include <vespa/document/base/testdocrepo.h> #include <vespa/document/bucket/bucketid.h> -#include <vespa/document/repo/documenttyperepo.h> #include <vespa/searchcore/proton/test/bucketfactory.h> #include <vespa/searchcore/proton/server/feedstates.h> #include <vespa/searchcore/proton/server/ireplayconfig.h> diff --git a/searchcore/src/vespa/searchcore/proton/reference/document_db_reference_resolver.cpp b/searchcore/src/vespa/searchcore/proton/reference/document_db_reference_resolver.cpp index 9be0eb2c728..9b097010fe1 100644 --- a/searchcore/src/vespa/searchcore/proton/reference/document_db_reference_resolver.cpp +++ b/searchcore/src/vespa/searchcore/proton/reference/document_db_reference_resolver.cpp @@ -14,7 +14,6 @@ #include <vespa/config-imported-fields.h> #include <vespa/document/datatype/documenttype.h> #include <vespa/document/datatype/referencedatatype.h> -#include <vespa/document/repo/documenttyperepo.h> using document::DataType; using document::DocumentType; diff --git a/searchcore/src/vespa/searchcore/proton/server/feedstates.cpp b/searchcore/src/vespa/searchcore/proton/server/feedstates.cpp index e41758fdb22..f0866347f59 100644 --- a/searchcore/src/vespa/searchcore/proton/server/feedstates.cpp +++ b/searchcore/src/vespa/searchcore/proton/server/feedstates.cpp @@ -5,7 +5,6 @@ #include "ifeedview.h" #include "ireplayconfig.h" #include "replaypacketdispatcher.h" -#include <vespa/document/repo/documenttyperepo.h> #include <vespa/searchcore/proton/bucketdb/ibucketdbhandler.h> #include <vespa/searchcore/proton/common/eventlogger.h> #include <vespa/searchlib/common/idestructorcallback.h> diff --git a/searchcore/src/vespa/searchcore/proton/test/dummy_feed_view.cpp b/searchcore/src/vespa/searchcore/proton/test/dummy_feed_view.cpp index fd2df6577d7..df23d79e08f 100644 --- a/searchcore/src/vespa/searchcore/proton/test/dummy_feed_view.cpp +++ b/searchcore/src/vespa/searchcore/proton/test/dummy_feed_view.cpp @@ -1,7 +1,6 @@ // Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "dummy_feed_view.h" -#include <vespa/document/repo/documenttyperepo.h> namespace proton::test { diff --git a/storage/src/vespa/storage/distributor/operations/external/removelocationoperation.cpp b/storage/src/vespa/storage/distributor/operations/external/removelocationoperation.cpp index cf3eed09bf0..71d8f1b17ea 100644 --- a/storage/src/vespa/storage/distributor/operations/external/removelocationoperation.cpp +++ b/storage/src/vespa/storage/distributor/operations/external/removelocationoperation.cpp @@ -4,7 +4,6 @@ #include <vespa/storageapi/message/removelocation.h> #include <vespa/document/bucket/bucketselector.h> #include <vespa/document/fieldvalue/document.h> -#include <vespa/document/repo/documenttyperepo.h> #include <vespa/document/select/parser.h> #include <vespa/storage/distributor/distributor_bucket_space.h> diff --git a/storage/src/vespa/storage/visiting/visitorthread.cpp b/storage/src/vespa/storage/visiting/visitorthread.cpp index 718e88a2917..a8f31514eb1 100644 --- a/storage/src/vespa/storage/visiting/visitorthread.cpp +++ b/storage/src/vespa/storage/visiting/visitorthread.cpp @@ -2,7 +2,6 @@ #include "visitorthread.h" #include "messages.h" -#include <vespa/document/repo/documenttyperepo.h> #include <vespa/document/select/bodyfielddetector.h> #include <vespa/document/select/orderingselector.h> #include <vespa/document/select/parser.h> diff --git a/storageapi/src/tests/mbusprot/storageprotocoltest.cpp b/storageapi/src/tests/mbusprot/storageprotocoltest.cpp index 73fbb43a4e9..b1abdeaf811 100644 --- a/storageapi/src/tests/mbusprot/storageprotocoltest.cpp +++ b/storageapi/src/tests/mbusprot/storageprotocoltest.cpp @@ -12,7 +12,6 @@ #include <vespa/storageapi/message/visitor.h> #include <vespa/document/base/testdocman.h> #include <vespa/document/document.h> -#include <vespa/document/repo/documenttyperepo.h> #include <vespa/document/update/fieldpathupdates.h> #include <vespa/document/test/make_document_bucket.h> #include <vespa/document/test/make_bucket_space.h> |