From 753896ede36ae0f11218499fbd6f2776cebce9dd Mon Sep 17 00:00:00 2001 From: Henning Baldersheim Date: Mon, 17 Aug 2020 14:09:36 +0000 Subject: There is no need to copy the document type as it has a longer lifetime scope than the visitor. --- storage/src/vespa/storage/distributor/distributor.h | 11 +++++------ storage/src/vespa/storage/persistence/fieldvisitor.h | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/storage/src/vespa/storage/distributor/distributor.h b/storage/src/vespa/storage/distributor/distributor.h index 84e195fdff2..fcc08030764 100644 --- a/storage/src/vespa/storage/distributor/distributor.h +++ b/storage/src/vespa/storage/distributor/distributor.h @@ -25,11 +25,11 @@ #include namespace storage { + struct DoneInitializeHandler; + class HostInfo; +} -struct DoneInitializeHandler; -class HostInfo; - -namespace distributor { +namespace storage::distributor { class DistributorBucketSpaceRepo; class SimpleMaintenanceScanner; @@ -342,5 +342,4 @@ private: bool _must_send_updated_host_info; }; -} // distributor -} // storage +} diff --git a/storage/src/vespa/storage/persistence/fieldvisitor.h b/storage/src/vespa/storage/persistence/fieldvisitor.h index 99558fe6e9c..688874742a6 100644 --- a/storage/src/vespa/storage/persistence/fieldvisitor.h +++ b/storage/src/vespa/storage/persistence/fieldvisitor.h @@ -15,7 +15,7 @@ namespace storage { class FieldVisitor : public document::select::Visitor { private: - document::DocumentType _docType; + const document::DocumentType & _docType; document::Field::Set::Builder _fields; public: -- cgit v1.2.3