summaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@broadpark.no>2018-04-05 21:12:48 +0200
committerTor Egge <Tor.Egge@broadpark.no>2018-04-05 21:59:02 +0200
commit7142d7ed1b19a760959d6adf8466e6cd8292e7d5 (patch)
treed8db8fa4fb15793b0913e5073d91a00cff380187 /searchcore
parent6f968e2e3ff884f9087e770a15b8b17f7f4c77ee (diff)
Remove DocumentTypeRepo::UP typedef.
Remove unneeded includes.
Diffstat (limited to 'searchcore')
-rw-r--r--searchcore/src/tests/proton/common/cachedselect_test.cpp8
-rw-r--r--searchcore/src/tests/proton/common/document_type_inspector/document_type_inspector_test.cpp12
-rw-r--r--searchcore/src/tests/proton/common/selectpruner_test.cpp8
-rw-r--r--searchcore/src/tests/proton/feedoperation/feedoperation_test.cpp4
-rw-r--r--searchcore/src/tests/proton/server/feedstates_test.cpp1
-rw-r--r--searchcore/src/vespa/searchcore/proton/reference/document_db_reference_resolver.cpp1
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/feedstates.cpp1
-rw-r--r--searchcore/src/vespa/searchcore/proton/test/dummy_feed_view.cpp1
8 files changed, 16 insertions, 20 deletions
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 {