diff options
31 files changed, 71 insertions, 165 deletions
diff --git a/memfilepersistence/src/tests/spi/iteratorhandlertest.cpp b/memfilepersistence/src/tests/spi/iteratorhandlertest.cpp index 673a72068b7..4372a8a45a7 100644 --- a/memfilepersistence/src/tests/spi/iteratorhandlertest.cpp +++ b/memfilepersistence/src/tests/spi/iteratorhandlertest.cpp @@ -1,14 +1,9 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include <vespa/fastos/fastos.h> -#include <set> -#include <vector> -#include <vespa/vdstestlib/cppunit/macros.h> #include <vespa/memfilepersistence/mapper/simplememfileiobuffer.h> #include <tests/spi/memfiletestutils.h> #include <tests/spi/simulatedfailurefile.h> #include <tests/spi/options_builder.h> -#include <vespa/document/fieldset/fieldsets.h> #include <vespa/document/select/parser.h> namespace storage { diff --git a/memfilepersistence/src/tests/spi/memcachetest.cpp b/memfilepersistence/src/tests/spi/memcachetest.cpp index 07697b79cac..7eece580b0a 100644 --- a/memfilepersistence/src/tests/spi/memcachetest.cpp +++ b/memfilepersistence/src/tests/spi/memcachetest.cpp @@ -1,10 +1,8 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include <vespa/fastos/fastos.h> #include <vespa/memfilepersistence/memfile/memfilecache.h> #include <vespa/storageframework/defaultimplementation/memory/simplememorylogic.h> #include <tests/spi/memfiletestutils.h> -#include <vespa/vdstestlib/cppunit/macros.h> namespace storage { diff --git a/memfilepersistence/src/tests/spi/memfileautorepairtest.cpp b/memfilepersistence/src/tests/spi/memfileautorepairtest.cpp index eefe962979d..265054a02ba 100644 --- a/memfilepersistence/src/tests/spi/memfileautorepairtest.cpp +++ b/memfilepersistence/src/tests/spi/memfileautorepairtest.cpp @@ -1,13 +1,9 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include <vespa/fastos/fastos.h> #include <vespa/memfilepersistence/mapper/memfilemapper.h> #include <vespa/memfilepersistence/mapper/memfile_v1_serializer.h> #include <vespa/memfilepersistence/mapper/memfile_v1_verifier.h> -#include <vespa/memfilepersistence/mapper/fileinfo.h> -#include <vespa/memfilepersistence/mapper/simplememfileiobuffer.h> #include <tests/spi/memfiletestutils.h> -#include <vespa/vdstestlib/cppunit/macros.h> namespace storage { namespace memfile { diff --git a/memfilepersistence/src/tests/spi/memfilev1serializertest.cpp b/memfilepersistence/src/tests/spi/memfilev1serializertest.cpp index a7960057d2a..f612bec1189 100644 --- a/memfilepersistence/src/tests/spi/memfilev1serializertest.cpp +++ b/memfilepersistence/src/tests/spi/memfilev1serializertest.cpp @@ -2,9 +2,7 @@ #include <vespa/memfilepersistence/mapper/memfilemapper.h> #include <vespa/memfilepersistence/mapper/memfile_v1_serializer.h> -#include <vespa/memfilepersistence/mapper/simplememfileiobuffer.h> #include <tests/spi/memfiletestutils.h> -#include <vespa/vdstestlib/cppunit/macros.h> #include <vespa/memfilepersistence/mapper/locationreadplanner.h> #include <tests/spi/simulatedfailurefile.h> #include <tests/spi/options_builder.h> diff --git a/memfilepersistence/src/tests/spi/memfilev1verifiertest.cpp b/memfilepersistence/src/tests/spi/memfilev1verifiertest.cpp index 51951e22aea..632bded6c6c 100644 --- a/memfilepersistence/src/tests/spi/memfilev1verifiertest.cpp +++ b/memfilepersistence/src/tests/spi/memfilev1verifiertest.cpp @@ -1,14 +1,9 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include <vespa/fastos/fastos.h> #include <vespa/memfilepersistence/mapper/memfilemapper.h> #include <vespa/memfilepersistence/mapper/memfile_v1_serializer.h> #include <vespa/memfilepersistence/mapper/memfile_v1_verifier.h> -#include <vespa/memfilepersistence/mapper/fileinfo.h> -#include <vespa/memfilepersistence/mapper/simplememfileiobuffer.h> #include <tests/spi/memfiletestutils.h> -#include <vespa/vdstestlib/cppunit/macros.h> -#include <tests/spi/simulatedfailurefile.h> namespace storage { namespace memfile { diff --git a/memfilepersistence/src/tests/spi/simplememfileiobuffertest.cpp b/memfilepersistence/src/tests/spi/simplememfileiobuffertest.cpp index 6d51188234b..cb1bc057705 100644 --- a/memfilepersistence/src/tests/spi/simplememfileiobuffertest.cpp +++ b/memfilepersistence/src/tests/spi/simplememfileiobuffertest.cpp @@ -1,7 +1,6 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespa/memfilepersistence/mapper/simplememfileiobuffer.h> -#include <vespa/vdstestlib/cppunit/macros.h> #include <tests/spi/memfiletestutils.h> #include <tests/spi/options_builder.h> diff --git a/memfilepersistence/src/tests/tools/vdsdisktooltest.cpp b/memfilepersistence/src/tests/tools/vdsdisktooltest.cpp index 0f36f0a0571..5de40311b2f 100644 --- a/memfilepersistence/src/tests/tools/vdsdisktooltest.cpp +++ b/memfilepersistence/src/tests/tools/vdsdisktooltest.cpp @@ -1,6 +1,5 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include <vespa/fastos/fastos.h> #include <vespa/config/subscription/configuri.h> #include <vespa/memfilepersistence/tools/vdsdisktool.h> #include <vespa/storageframework/defaultimplementation/clock/fakeclock.h> diff --git a/messagebus_test/src/tests/error/cpp-client.cpp b/messagebus_test/src/tests/error/cpp-client.cpp index 19cb09b3738..10d7eb7e521 100644 --- a/messagebus_test/src/tests/error/cpp-client.cpp +++ b/messagebus_test/src/tests/error/cpp-client.cpp @@ -1,19 +1,15 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include <vespa/fastos/fastos.h> -#include <vespa/log/log.h> -LOG_SETUP("cpp-client"); + #include <vespa/messagebus/messagebus.h> #include <vespa/messagebus/sourcesession.h> +#include <vespa/messagebus/errorcode.h> #include <vespa/messagebus/testlib/simplemessage.h> #include <vespa/messagebus/testlib/simplereply.h> #include <vespa/messagebus/testlib/simpleprotocol.h> #include <vespa/messagebus/rpcmessagebus.h> -#include <vespa/messagebus/errorcode.h> -#include <vespa/messagebus/iprotocol.h> -#include <vespa/messagebus/protocolset.h> #include <vespa/messagebus/sourcesessionparams.h> #include <vespa/messagebus/testlib/receptor.h> -#include <vespa/vespalib/util/sync.h> +#include <vespa/fastos/app.h> using namespace mbus; diff --git a/messagebus_test/src/tests/error/cpp-server.cpp b/messagebus_test/src/tests/error/cpp-server.cpp index 13cfa76984b..c738c871e9a 100644 --- a/messagebus_test/src/tests/error/cpp-server.cpp +++ b/messagebus_test/src/tests/error/cpp-server.cpp @@ -1,18 +1,11 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include <vespa/fastos/fastos.h> -#include <vespa/log/log.h> -LOG_SETUP("cpp-server"); + #include <vespa/messagebus/messagebus.h> -#include <vespa/messagebus/destinationsession.h> -#include <vespa/messagebus/testlib/simplemessage.h> -#include <vespa/messagebus/testlib/simplereply.h> #include <vespa/messagebus/testlib/simpleprotocol.h> #include <vespa/messagebus/rpcmessagebus.h> -#include <vespa/messagebus/iprotocol.h> -#include <vespa/messagebus/protocolset.h> #include <vespa/messagebus/emptyreply.h> -#include <vespa/messagebus/error.h> #include <vespa/messagebus/errorcode.h> +#include <vespa/fastos/app.h> using namespace mbus; diff --git a/messagebus_test/src/tests/speed/cpp-client.cpp b/messagebus_test/src/tests/speed/cpp-client.cpp index 54ccadc9ddd..dd3def7efc9 100644 --- a/messagebus_test/src/tests/speed/cpp-client.cpp +++ b/messagebus_test/src/tests/speed/cpp-client.cpp @@ -1,16 +1,12 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include <vespa/fastos/fastos.h> -#include <vespa/log/log.h> -LOG_SETUP("cpp-client"); + #include <vespa/messagebus/messagebus.h> #include <vespa/messagebus/routing/retrytransienterrorspolicy.h> #include <vespa/messagebus/rpcmessagebus.h> -#include <vespa/messagebus/sourcesession.h> -#include <vespa/messagebus/sourcesessionparams.h> #include <vespa/messagebus/testlib/simplemessage.h> #include <vespa/messagebus/testlib/simpleprotocol.h> #include <vespa/messagebus/testlib/simplereply.h> -#include <vespa/vespalib/util/sync.h> +#include <vespa/fastos/app.h> using namespace mbus; diff --git a/messagebus_test/src/tests/speed/cpp-server.cpp b/messagebus_test/src/tests/speed/cpp-server.cpp index 904bf4d6d51..3d29f5641a2 100644 --- a/messagebus_test/src/tests/speed/cpp-server.cpp +++ b/messagebus_test/src/tests/speed/cpp-server.cpp @@ -1,15 +1,11 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include <vespa/fastos/fastos.h> -#include <vespa/log/log.h> -LOG_SETUP("cpp-server"); + #include <vespa/messagebus/messagebus.h> -#include <vespa/messagebus/destinationsession.h> #include <vespa/messagebus/testlib/simplemessage.h> #include <vespa/messagebus/testlib/simplereply.h> #include <vespa/messagebus/testlib/simpleprotocol.h> #include <vespa/messagebus/rpcmessagebus.h> -#include <vespa/messagebus/iprotocol.h> -#include <vespa/messagebus/protocolset.h> +#include <vespa/fastos/app.h> using namespace mbus; diff --git a/messagebus_test/src/tests/trace/cpp-server.cpp b/messagebus_test/src/tests/trace/cpp-server.cpp index ce495090e91..62ef2f82bad 100644 --- a/messagebus_test/src/tests/trace/cpp-server.cpp +++ b/messagebus_test/src/tests/trace/cpp-server.cpp @@ -1,16 +1,10 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include <vespa/fastos/fastos.h> -#include <vespa/log/log.h> -LOG_SETUP("cpp-server"); + #include <vespa/messagebus/messagebus.h> -#include <vespa/messagebus/destinationsession.h> -#include <vespa/messagebus/testlib/simplemessage.h> -#include <vespa/messagebus/testlib/simplereply.h> #include <vespa/messagebus/testlib/simpleprotocol.h> #include <vespa/messagebus/rpcmessagebus.h> -#include <vespa/messagebus/iprotocol.h> -#include <vespa/messagebus/protocolset.h> #include <vespa/messagebus/emptyreply.h> +#include <vespa/fastos/app.h> using namespace mbus; diff --git a/persistence/src/tests/dummyimpl/dummyimpltest.cpp b/persistence/src/tests/dummyimpl/dummyimpltest.cpp index 4b107fde324..9348d90c05a 100644 --- a/persistence/src/tests/dummyimpl/dummyimpltest.cpp +++ b/persistence/src/tests/dummyimpl/dummyimpltest.cpp @@ -1,13 +1,9 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include <vespa/fastos/fastos.h> -#include <vespa/log/log.h> #include <vespa/vdstestlib/cppunit/macros.h> #include <vespa/persistence/conformancetest/conformancetest.h> #include <vespa/persistence/dummyimpl/dummypersistence.h> -LOG_SETUP(".test.dummyimpl"); - namespace storage { namespace spi { @@ -20,9 +16,7 @@ struct DummyImplTest : public ConformanceTest { return PersistenceProvider::UP(new dummy::DummyPersistence(repo, 4)); } - bool supportsActiveState() const override { - return true; - } + bool supportsActiveState() const override { return true; } }; DummyImplTest() diff --git a/persistence/src/tests/proxy/proxyfactory.h b/persistence/src/tests/proxy/proxyfactory.h index 3a18440a6e7..1d0c7bd2db7 100644 --- a/persistence/src/tests/proxy/proxyfactory.h +++ b/persistence/src/tests/proxy/proxyfactory.h @@ -2,7 +2,6 @@ #pragma once -#include <vespa/vespalib/util/vstringfmt.h> #include <vespa/persistence/conformancetest/conformancetest.h> #include <vespa/persistence/proxy/providerstub.h> #include <vespa/persistence/proxy/providerproxy.h> @@ -30,12 +29,9 @@ struct ProxyFactory : ConformanceTest::PersistenceFactory return Provider::UP(new Client("tcp/localhost:3456", *repo)); } - virtual bool - supportsActiveState() const override - { + bool supportsActiveState() const override { return false; } }; } // namespace spi } // namespace storage - diff --git a/searchlib/src/vespa/searchlib/attribute/createarraystd.cpp b/searchlib/src/vespa/searchlib/attribute/createarraystd.cpp index 29ea819f71d..0c312a6fe6a 100644 --- a/searchlib/src/vespa/searchlib/attribute/createarraystd.cpp +++ b/searchlib/src/vespa/searchlib/attribute/createarraystd.cpp @@ -2,15 +2,11 @@ #include "attributefactory.h" #include "defines.h" - #include "attributevector.hpp" #include "multivalueattribute.hpp" #include "multinumericattribute.hpp" #include "multistringattribute.h" -#include <vespa/log/log.h> -LOG_SETUP(".createarraystd"); - namespace search { using attribute::BasicType; diff --git a/searchlib/src/vespa/searchlib/attribute/createsetstd.cpp b/searchlib/src/vespa/searchlib/attribute/createsetstd.cpp index 5aa40a20d14..721af2891e3 100644 --- a/searchlib/src/vespa/searchlib/attribute/createsetstd.cpp +++ b/searchlib/src/vespa/searchlib/attribute/createsetstd.cpp @@ -1,16 +1,11 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include <vespa/fastos/fastos.h> -#include <vespa/searchlib/attribute/attributefactory.h> +#include "attributefactory.h" #include "defines.h" - -#include <vespa/log/log.h> -LOG_SETUP(".createsetstd"); - -#include <vespa/searchlib/attribute/attributevector.hpp> -#include <vespa/searchlib/attribute/multivalueattribute.hpp> -#include <vespa/searchlib/attribute/multinumericattribute.hpp> -#include <vespa/searchlib/attribute/multistringattribute.h> +#include "attributevector.hpp" +#include "multivalueattribute.hpp" +#include "multinumericattribute.hpp" +#include "multistringattribute.h" namespace search { diff --git a/searchlib/src/vespa/searchlib/attribute/createsinglefastsearch.cpp b/searchlib/src/vespa/searchlib/attribute/createsinglefastsearch.cpp index 02890eb8789..ad08e20808a 100644 --- a/searchlib/src/vespa/searchlib/attribute/createsinglefastsearch.cpp +++ b/searchlib/src/vespa/searchlib/attribute/createsinglefastsearch.cpp @@ -1,21 +1,16 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include <vespa/fastos/fastos.h> -#include <vespa/searchlib/attribute/attributefactory.h> -#include <vespa/searchlib/attribute/integerbase.h> -#include <vespa/searchlib/attribute/floatbase.h> +#include "attributefactory.h" +#include "integerbase.h" +#include "floatbase.h" #include "defines.h" - -#include <vespa/log/log.h> -LOG_SETUP(".createsinglefastsearch"); - -#include <vespa/searchlib/attribute/singlestringattribute.h> -#include <vespa/searchlib/attribute/singlestringpostattribute.hpp> -#include <vespa/searchlib/attribute/singlenumericenumattribute.hpp> -#include <vespa/searchlib/attribute/singlenumericpostattribute.hpp> -#include <vespa/searchlib/attribute/enumstore.hpp> -#include <vespa/searchlib/attribute/enumattribute.hpp> -#include <vespa/searchlib/attribute/singleenumattribute.hpp> +#include "singlestringattribute.h" +#include "singlestringpostattribute.hpp" +#include "singlenumericenumattribute.hpp" +#include "singlenumericpostattribute.hpp" +#include "enumstore.hpp" +#include "enumattribute.hpp" +#include "singleenumattribute.hpp" #define INTPOSTING(T) SingleValueNumericPostingAttribute< ENUM_ATTRIBUTE(IntegerAttributeTemplate<T>) > #define FLOATPOSTING(T) SingleValueNumericPostingAttribute< ENUM_ATTRIBUTE(FloatingPointAttributeTemplate<T>) > diff --git a/searchlib/src/vespa/searchlib/attribute/createsinglestd.cpp b/searchlib/src/vespa/searchlib/attribute/createsinglestd.cpp index 766195c8e9c..c3a126631e6 100644 --- a/searchlib/src/vespa/searchlib/attribute/createsinglestd.cpp +++ b/searchlib/src/vespa/searchlib/attribute/createsinglestd.cpp @@ -1,17 +1,12 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include <vespa/fastos/fastos.h> -#include <vespa/searchlib/attribute/attributefactory.h> - -#include <vespa/log/log.h> -LOG_SETUP(".createsinglestd"); - +#include "attributefactory.h" #include "predicate_attribute.h" #include "singlesmallnumericattribute.h" #include "reference_attribute.h" -#include <vespa/searchlib/attribute/attributevector.hpp> -#include <vespa/searchlib/attribute/singlenumericattribute.hpp> -#include <vespa/searchlib/attribute/singlestringattribute.h> +#include "attributevector.hpp" +#include "singlenumericattribute.hpp" +#include "singlestringattribute.h" #include <vespa/searchlib/tensor/generic_tensor_attribute.h> #include <vespa/searchlib/tensor/dense_tensor_attribute.h> diff --git a/searchlib/src/vespa/searchlib/attribute/enumattribute.h b/searchlib/src/vespa/searchlib/attribute/enumattribute.h index 8cc383d4abf..ca5058c71d3 100644 --- a/searchlib/src/vespa/searchlib/attribute/enumattribute.h +++ b/searchlib/src/vespa/searchlib/attribute/enumattribute.h @@ -61,7 +61,7 @@ protected: virtual EnumType getFromEnum(EnumHandle e) const { return _enumStore.getValue(e); } virtual void fillPostings(LoadedVector & loaded) { (void) loaded; } - void fillEnum(LoadedVector & loaded); + void fillEnum(LoadedVector & loaded) override; void fillEnum0(const void *src, size_t srcLen, EnumIndexVector &eidxs) override; void fixupEnumRefCounts(const EnumVector &enumHist) override; uint64_t getUniqueValueCount(void) const override; diff --git a/searchlib/src/vespa/searchlib/attribute/multinumericattribute.h b/searchlib/src/vespa/searchlib/attribute/multinumericattribute.h index 6afede8d3b4..01d9efe0cbc 100644 --- a/searchlib/src/vespa/searchlib/attribute/multinumericattribute.h +++ b/searchlib/src/vespa/searchlib/attribute/multinumericattribute.h @@ -256,4 +256,3 @@ public: }; } - diff --git a/searchlib/src/vespa/searchlib/attribute/multivalueattribute.h b/searchlib/src/vespa/searchlib/attribute/multivalueattribute.h index 12b1098bbb3..e02a81e44ef 100644 --- a/searchlib/src/vespa/searchlib/attribute/multivalueattribute.h +++ b/searchlib/src/vespa/searchlib/attribute/multivalueattribute.h @@ -3,7 +3,6 @@ #pragma once #include "multi_value_mapping.h" -#include <vespa/vespalib/stllike/string.h> #include "attributevector.h" namespace search { @@ -48,7 +47,7 @@ protected: * Can be overridden by subclasses that need to resize structures as a result of this. * Should return true if underlying structures were resized. **/ - virtual bool onAddDoc(DocId doc) override { (void) doc; return false; } + bool onAddDoc(DocId doc) override { (void) doc; return false; } AddressSpace getMultiValueAddressSpaceUsage() const override; @@ -74,4 +73,3 @@ public: }; } // namespace search - diff --git a/searchlib/src/vespa/searchlib/attribute/numericbase.h b/searchlib/src/vespa/searchlib/attribute/numericbase.h index 94bc5c1472d..2554102b511 100644 --- a/searchlib/src/vespa/searchlib/attribute/numericbase.h +++ b/searchlib/src/vespa/searchlib/attribute/numericbase.h @@ -4,7 +4,7 @@ #include "attributevector.h" #include <vespa/searchlib/common/sort.h> -#include <vespa/searchlib/attribute/enumstorebase.h> +#include "enumstorebase.h" #include "loadedenumvalue.h" namespace search { @@ -28,6 +28,7 @@ protected: virtual void fillEnumIdx(ReaderBase &attrReader, const EnumIndexVector &eidxs, EnumVector &enumHist); virtual void fillPostingsFixupEnum(const attribute::LoadedEnumAttributeVector &loaded); virtual void fixupEnumRefCounts(const EnumVector &enumHist); + virtual bool onAddDoc(DocId) { return true; } template<typename T> class Equal diff --git a/searchlib/src/vespa/searchlib/attribute/singleenumattribute.h b/searchlib/src/vespa/searchlib/attribute/singleenumattribute.h index 1843bde4d54..a835aa85896 100644 --- a/searchlib/src/vespa/searchlib/attribute/singleenumattribute.h +++ b/searchlib/src/vespa/searchlib/attribute/singleenumattribute.h @@ -2,7 +2,7 @@ #pragma once -#include <vespa/searchlib/attribute/enumattribute.h> +#include "enumattribute.h" #include <vespa/searchlib/common/rcuvector.h> namespace search { @@ -83,7 +83,8 @@ protected: } virtual void mergeMemoryStats(MemoryUsage & total) { (void) total; } - virtual void fillValues(LoadedVector & loaded) override; + + void fillValues(LoadedVector & loaded) override; void fillEnumIdx(ReaderBase &attrReader, const EnumStoreBase::IndexVector &eidxs, @@ -101,7 +102,7 @@ protected: * * Should return true if underlying structures were resized. **/ - virtual bool onAddDoc(DocId doc) override; + bool onAddDoc(DocId doc) override; public: SingleValueEnumAttribute(const vespalib::string & baseFileName, const AttributeVector::Config & cfg); @@ -136,4 +137,3 @@ public: }; } // namespace search - diff --git a/searchlib/src/vespa/searchlib/attribute/singleenumattribute.hpp b/searchlib/src/vespa/searchlib/attribute/singleenumattribute.hpp index c798351211a..4b19f8d1af0 100644 --- a/searchlib/src/vespa/searchlib/attribute/singleenumattribute.hpp +++ b/searchlib/src/vespa/searchlib/attribute/singleenumattribute.hpp @@ -2,8 +2,8 @@ #pragma once -#include <vespa/searchlib/attribute/singleenumattribute.h> -#include <vespa/searchlib/attribute/enumattribute.hpp> +#include "singleenumattribute.h" +#include "enumattribute.hpp" #include "ipostinglistattributebase.h" #include "singleenumattributesaver.h" #include "load_utils.h" diff --git a/searchlib/src/vespa/searchlib/attribute/singlenumericenumattribute.h b/searchlib/src/vespa/searchlib/attribute/singlenumericenumattribute.h index 828c1434819..369fbf77f0b 100644 --- a/searchlib/src/vespa/searchlib/attribute/singlenumericenumattribute.h +++ b/searchlib/src/vespa/searchlib/attribute/singlenumericenumattribute.h @@ -46,9 +46,9 @@ private: protected: // from SingleValueEnumAttribute - virtual void considerUpdateAttributeChange(const Change & c); - virtual void considerArithmeticAttributeChange(const Change & c, UniqueSet & newUniques); - virtual void applyArithmeticValueChange(const Change & c, EnumStoreBase::IndexVector & unused); + void considerUpdateAttributeChange(const Change & c) override; + void considerArithmeticAttributeChange(const Change & c, UniqueSet & newUniques) override; + void applyArithmeticValueChange(const Change & c, EnumStoreBase::IndexVector & unused) override; /* * Specialization of SearchContext @@ -92,9 +92,10 @@ public: const AttributeVector::Config & c = AttributeVector::Config(AttributeVector::BasicType::fromType(T()), attribute::CollectionType::SINGLE)); + ~SingleValueNumericEnumAttribute(); - virtual void onCommit(); - virtual bool onLoad(); + void onCommit() override; + bool onLoad() override; bool onLoadEnumerated(ReaderBase &attrReader); @@ -104,46 +105,46 @@ public: //------------------------------------------------------------------------- // Attribute read API //------------------------------------------------------------------------- - virtual T get(DocId doc) const { + T get(DocId doc) const override { return this->_enumStore.getValue(this->_enumIndices[doc]); } - virtual largeint_t getInt(DocId doc) const { + largeint_t getInt(DocId doc) const override { return static_cast<largeint_t>(get(doc)); } - virtual double getFloat(DocId doc) const { + double getFloat(DocId doc) const override { return static_cast<double>(get(doc)); } - virtual uint32_t getAll(DocId doc, T * v, uint32_t sz) const { + uint32_t getAll(DocId doc, T * v, uint32_t sz) const override { if (sz > 0) { v[0] = get(doc); } return 1; } - virtual uint32_t get(DocId doc, largeint_t * v, uint32_t sz) const { + uint32_t get(DocId doc, largeint_t * v, uint32_t sz) const override { if (sz > 0) { v[0] = getInt(doc); } return 1; } - virtual uint32_t get(DocId doc, double * v, uint32_t sz) const { + uint32_t get(DocId doc, double * v, uint32_t sz) const override { if (sz > 0) { v[0] = getFloat(doc); } return 1; } - virtual uint32_t getAll(DocId doc, Weighted * v, uint32_t sz) const { + uint32_t getAll(DocId doc, Weighted * v, uint32_t sz) const override { if (sz > 0) { v[0] = Weighted(get(doc)); } return 1; } - virtual uint32_t get(DocId doc, WeightedInt * v, uint32_t sz) const { + uint32_t get(DocId doc, WeightedInt * v, uint32_t sz) const override { if (sz > 0) { v[0] = WeightedInt(getInt(doc)); } return 1; } - virtual uint32_t get(DocId doc, WeightedFloat * v, uint32_t sz) const { + uint32_t get(DocId doc, WeightedFloat * v, uint32_t sz) const override { if (sz > 0) { v[0] = WeightedFloat(getFloat(doc)); } diff --git a/searchlib/src/vespa/searchlib/attribute/singlenumericenumattribute.hpp b/searchlib/src/vespa/searchlib/attribute/singlenumericenumattribute.hpp index fbf56440a08..698bdbf82d4 100644 --- a/searchlib/src/vespa/searchlib/attribute/singlenumericenumattribute.hpp +++ b/searchlib/src/vespa/searchlib/attribute/singlenumericenumattribute.hpp @@ -64,6 +64,9 @@ SingleValueNumericEnumAttribute(const vespalib::string & baseFileName, } template <typename B> +SingleValueNumericEnumAttribute<B>::~SingleValueNumericEnumAttribute() {} + +template <typename B> void SingleValueNumericEnumAttribute<B>::onCommit() { diff --git a/storageapi/src/tests/mbusprot/storageprotocoltest.cpp b/storageapi/src/tests/mbusprot/storageprotocoltest.cpp index bc71429032e..ed59b49ff04 100644 --- a/storageapi/src/tests/mbusprot/storageprotocoltest.cpp +++ b/storageapi/src/tests/mbusprot/storageprotocoltest.cpp @@ -1,11 +1,5 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include <vespa/document/base/testdocman.h> -#include <vespa/document/document.h> -#include <vespa/document/repo/documenttyperepo.h> -#include <vespa/document/update/fieldpathupdates.h> -#include <iomanip> -#include <sstream> #include <vespa/storageapi/message/persistence.h> #include <vespa/storageapi/message/bucket.h> #include <vespa/storageapi/message/bucketsplitting.h> @@ -16,10 +10,16 @@ #include <vespa/storageapi/mbusprot/storageprotocol.h> #include <vespa/storageapi/mbusprot/storagecommand.h> #include <vespa/storageapi/mbusprot/storagereply.h> +#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/vdstestlib/cppunit/macros.h> #include <vespa/vespalib/util/growablebytebuffer.h> -#include <vespa/storageapi/message/visitor.h> #include <vespa/vespalib/objects/nbostream.h> +#include <iomanip> +#include <sstream> using std::shared_ptr; using document::ByteBuffer; @@ -837,8 +837,7 @@ namespace { api::StorageReply::UP makeReply() override; - virtual void print(std::ostream& out, bool verbose, const std::string& indent) const override - { + void print(std::ostream& out, bool verbose, const std::string& indent) const override { out << "MyCommand()"; if (verbose) { out << " : "; @@ -850,8 +849,7 @@ namespace { struct MyReply : public api::InternalReply { MyReply(const MyCommand& cmd) : InternalReply(102, cmd) {} - virtual void print(std::ostream& out, bool verbose, const std::string& indent) const override - { + void print(std::ostream& out, bool verbose, const std::string& indent) const override { out << "MyReply()"; if (verbose) { out << " : "; diff --git a/vespaclient/src/vespa/vespaclient/spoolmaster/application.h b/vespaclient/src/vespa/vespaclient/spoolmaster/application.h index 87f628e631c..2a20dd1b290 100644 --- a/vespaclient/src/vespa/vespaclient/spoolmaster/application.h +++ b/vespaclient/src/vespa/vespaclient/spoolmaster/application.h @@ -1,9 +1,9 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once +#include <vespa/fastos/app.h> #include <string> #include <vector> -#include <vespa/fastos/app.h> namespace spoolmaster { /** @@ -23,19 +23,9 @@ private: bool findOutboxes(); void moveLinks(); public: - /** - * Constructs a new spoolmaster object. - */ Application(); - - /** - * Destructor. Frees any allocated resources. - */ - virtual ~Application(); - - // Implements FastOS_Application. + ~Application(); int Main() override; }; } - diff --git a/vespaclient/src/vespa/vespaclient/vespadoclocator/application.h b/vespaclient/src/vespa/vespaclient/vespadoclocator/application.h index 2e50ffde2c0..fdb4129a188 100644 --- a/vespaclient/src/vespa/vespaclient/vespadoclocator/application.h +++ b/vespaclient/src/vespa/vespaclient/vespadoclocator/application.h @@ -17,7 +17,6 @@ private: bool printDocumentLocation(Locator &locator, const std::string &docId); public: - // Implements FastOS_Application. int Main() override; }; diff --git a/vespaclient/src/vespa/vespaclient/vesparoute/application.h b/vespaclient/src/vespa/vespaclient/vesparoute/application.h index e7eefb7f16d..e77b70f1454 100644 --- a/vespaclient/src/vespa/vespaclient/vesparoute/application.h +++ b/vespaclient/src/vespa/vespaclient/vesparoute/application.h @@ -64,13 +64,9 @@ private: std::vector<std::string> &oos, std::set<std::string> &errors) const; public: - /** Null member variables. */ Application(); ~Application(); - - // Inherit doc from FastOS_Application. int Main() override; }; } - diff --git a/vespaclient/src/vespa/vespaclient/vesparoute/mynetwork.h b/vespaclient/src/vespa/vespaclient/vesparoute/mynetwork.h index f9737d1de9a..4c50ec9cb38 100644 --- a/vespaclient/src/vespa/vespaclient/vesparoute/mynetwork.h +++ b/vespaclient/src/vespa/vespaclient/vesparoute/mynetwork.h @@ -21,11 +21,7 @@ public: // Overrides RPCNetwork. bool allocServiceAddress(mbus::RoutingNode &recipient) override; - - // Overrides RPCNetwork. void freeServiceAddress(mbus::RoutingNode &recipient) override; - - // Overrides RPCNetwork. void send(const mbus::Message &msg, const std::vector<mbus::RoutingNode*> &recipients) override; /** @@ -43,4 +39,3 @@ public: */ void removeNodes(std::vector<mbus::RoutingNode*> &nodes); }; - |