diff options
author | Geir Storli <geirst@yahooinc.com> | 2022-12-21 10:33:01 +0000 |
---|---|---|
committer | Geir Storli <geirst@yahooinc.com> | 2022-12-21 10:59:44 +0000 |
commit | 111e8f006cb92b08f6894c716b6e8d5dd9e94c0c (patch) | |
tree | 3d596543b2dab4e77feace6098ddf6bc1e127dc8 /searchcore | |
parent | bc97f528bf6ca32750cadb84901beee144c03e41 (diff) |
Change from typedef to using in searchcore.
Diffstat (limited to 'searchcore')
146 files changed, 292 insertions, 294 deletions
diff --git a/searchcore/src/apps/proton/proton.cpp b/searchcore/src/apps/proton/proton.cpp index 8468487995a..06df12f73b7 100644 --- a/searchcore/src/apps/proton/proton.cpp +++ b/searchcore/src/apps/proton/proton.cpp @@ -20,7 +20,7 @@ #include <vespa/log/log.h> LOG_SETUP("proton"); -typedef vespalib::SignalHandler SIG; +using SIG = vespalib::SignalHandler; using vespa::config::search::core::ProtonConfig; struct Params diff --git a/searchcore/src/apps/tests/persistenceconformance_test.cpp b/searchcore/src/apps/tests/persistenceconformance_test.cpp index fad09101d95..0462c385e62 100644 --- a/searchcore/src/apps/tests/persistenceconformance_test.cpp +++ b/searchcore/src/apps/tests/persistenceconformance_test.cpp @@ -61,10 +61,10 @@ using search::transactionlog::TransLogServer; using storage::spi::ConformanceTest; using storage::spi::PersistenceProvider; -typedef ConformanceTest::PersistenceFactory PersistenceFactory; -typedef DocumentDBConfig::DocumenttypesConfigSP DocumenttypesConfigSP; -typedef std::map<DocTypeName, DocumentDB::SP> DocumentDBMap; -typedef std::vector<DocTypeName> DocTypeVector; +using PersistenceFactory = ConformanceTest::PersistenceFactory; +using DocumenttypesConfigSP = DocumentDBConfig::DocumenttypesConfigSP; +using DocumentDBMap = std::map<DocTypeName, DocumentDB::SP>; +using DocTypeVector = std::vector<DocTypeName>; void storeDocType(DocTypeVector *types, const DocumentType &type) @@ -74,8 +74,8 @@ storeDocType(DocTypeVector *types, const DocumentType &type) struct SchemaConfigFactory { - typedef DocumentDBConfig CS; - typedef std::shared_ptr<SchemaConfigFactory> SP; + using CS = DocumentDBConfig; + using SP = std::shared_ptr<SchemaConfigFactory>; virtual ~SchemaConfigFactory() = default; static SchemaConfigFactory::SP get() { return std::make_shared<SchemaConfigFactory>(); } virtual CS::IndexschemaConfigSP createIndexSchema(const DocumentType &docType) { @@ -117,7 +117,7 @@ public: if (docType == nullptr) { return DocumentDBConfig::SP(); } - typedef DocumentDBConfig CS; + using CS = DocumentDBConfig; CS::IndexschemaConfigSP indexschema = _schemaFactory->createIndexSchema(*docType); CS::AttributesConfigSP attributes = _schemaFactory->createAttributes(*docType); CS::SummaryConfigSP summary = _schemaFactory->createSummary(*docType); @@ -223,7 +223,7 @@ class DocumentDBRepo { private: DocumentDBMap _docDbs; public: - typedef std::unique_ptr<DocumentDBRepo> UP; + using UP = std::unique_ptr<DocumentDBRepo>; DocumentDBRepo(const ConfigFactory &cfgFactory, DocumentDBFactory &docDbFactory) : _docDbs() { diff --git a/searchcore/src/apps/vespa-gen-testdocs/vespa-gen-testdocs.cpp b/searchcore/src/apps/vespa-gen-testdocs/vespa-gen-testdocs.cpp index db89cbf6c2e..180f4618de6 100644 --- a/searchcore/src/apps/vespa-gen-testdocs/vespa-gen-testdocs.cpp +++ b/searchcore/src/apps/vespa-gen-testdocs/vespa-gen-testdocs.cpp @@ -19,8 +19,8 @@ #include <vespa/log/log.h> LOG_SETUP("vespa-gen-testdocs"); -typedef vespalib::hash_set<vespalib::string> StringSet; -typedef std::vector<vespalib::string> StringArray; +using StringSet = vespalib::hash_set<vespalib::string>; +using StringArray = std::vector<vespalib::string>; using namespace vespalib::alloc; using vespalib::string; @@ -162,7 +162,7 @@ StringGenerator::rand_unique_array(StringArray &res, class FieldGenerator { public: - typedef std::shared_ptr<FieldGenerator> SP; + using SP = std::shared_ptr<FieldGenerator>; protected: const string _name; @@ -383,7 +383,7 @@ ModTextFieldGenerator::~ModTextFieldGenerator() void ModTextFieldGenerator::generateValue(vespalib::asciistream &doc, uint32_t id) { - typedef std::vector<uint32_t>::const_iterator MI; + using MI = std::vector<uint32_t>::const_iterator; bool first = true; for (MI mi(_mods.begin()), me(_mods.end()); mi != me; ++mi) { uint32_t m = *mi; @@ -469,7 +469,7 @@ class DocumentGenerator string _docType; string _idPrefix; vespalib::asciistream _doc; - typedef std::vector<FieldGenerator::SP> FieldVec; + using FieldVec = std::vector<FieldGenerator::SP>; const FieldVec _fields; void @@ -507,7 +507,7 @@ DocumentGenerator::~DocumentGenerator() void DocumentGenerator::setup() { - typedef FieldVec::const_iterator FI; + using FI = FieldVec::const_iterator; for (FI i(_fields.begin()), ie(_fields.end()); i != ie; ++i) { (*i)->setup(); } diff --git a/searchcore/src/apps/vespa-transactionlog-inspect/vespa-transactionlog-inspect.cpp b/searchcore/src/apps/vespa-transactionlog-inspect/vespa-transactionlog-inspect.cpp index 749ca2fab80..00f62aefc28 100644 --- a/searchcore/src/apps/vespa-transactionlog-inspect/vespa-transactionlog-inspect.cpp +++ b/searchcore/src/apps/vespa-transactionlog-inspect/vespa-transactionlog-inspect.cpp @@ -30,12 +30,12 @@ using namespace search::transactionlog; using document::DocumentTypeRepo; -typedef std::shared_ptr<DocumenttypesConfig> DocumenttypesConfigSP; -typedef std::unique_ptr<IReplayPacketHandler> IReplayPacketHandlerUP; +using DocumenttypesConfigSP = std::shared_ptr<DocumenttypesConfig>; +using IReplayPacketHandlerUP = std::unique_ptr<IReplayPacketHandler>; struct DummyFileHeaderContext : public FileHeaderContext { - typedef std::unique_ptr<DummyFileHeaderContext> UP; + using UP = std::unique_ptr<DummyFileHeaderContext>; virtual void addTags(vespalib::GenericHeader &, const vespalib::string &) const override {} }; @@ -44,7 +44,7 @@ namespace { class ConfigFile { - typedef std::shared_ptr<ConfigFile> SP; + using SP = std::shared_ptr<ConfigFile>; vespalib::string _name; time_t _modTime; @@ -186,7 +186,7 @@ public: void replay(const NewConfigOperation &op) override { print(op); - typedef std::map<std::string, ConfigFile>::const_iterator I; + using I = std::map<std::string, ConfigFile>::const_iterator; for (I i(_streamHandler._cfs.begin()), ie(_streamHandler._cfs.end()); i != ie; ++i) { i->second.print(); @@ -332,7 +332,7 @@ public: struct Utility { virtual ~Utility() = default; - typedef std::unique_ptr<Utility> UP; + using UP = std::unique_ptr<Utility>; virtual int run() = 0; }; @@ -349,7 +349,7 @@ public: std::string tlsDir; std::string tlsName; int listenPort; - typedef std::unique_ptr<BaseOptions> UP; + using UP = std::unique_ptr<BaseOptions>; BaseOptions(int argc, const char* const* argv); virtual ~BaseOptions(); void usage() { _opts.writeSyntaxPage(std::cout); } diff --git a/searchcore/src/tests/grouping/grouping.cpp b/searchcore/src/tests/grouping/grouping.cpp index a08d4703814..f71912b7100 100644 --- a/searchcore/src/tests/grouping/grouping.cpp +++ b/searchcore/src/tests/grouping/grouping.cpp @@ -83,7 +83,7 @@ struct MyWorld { //----------------------------------------------------------------------------- -typedef GroupingContext::GroupingList GroupingList; +using GroupingList = GroupingContext::GroupingList; SessionId createSessionId(const std::string & s) { std::vector<char> vec; diff --git a/searchcore/src/tests/proton/attribute/attribute_manager/attribute_manager_test.cpp b/searchcore/src/tests/proton/attribute/attribute_manager/attribute_manager_test.cpp index 8f409b3e31e..07167a91498 100644 --- a/searchcore/src/tests/proton/attribute/attribute_manager/attribute_manager_test.cpp +++ b/searchcore/src/tests/proton/attribute/attribute_manager/attribute_manager_test.cpp @@ -72,9 +72,9 @@ using vespa::config::search::AttributesConfig; using vespa::config::search::AttributesConfigBuilder; using vespalib::eval::ValueType; -typedef search::attribute::Config AVConfig; -typedef proton::AttributeCollectionSpec::AttributeList AttrSpecList; -typedef proton::AttributeCollectionSpec AttrMgrSpec; +using AVConfig = search::attribute::Config; +using AttrSpecList = proton::AttributeCollectionSpec::AttributeList; +using AttrMgrSpec = proton::AttributeCollectionSpec; namespace { diff --git a/searchcore/src/tests/proton/attribute/attributeflush_test.cpp b/searchcore/src/tests/proton/attribute/attributeflush_test.cpp index 7249476a907..b94df75c7be 100644 --- a/searchcore/src/tests/proton/attribute/attributeflush_test.cpp +++ b/searchcore/src/tests/proton/attribute/attributeflush_test.cpp @@ -33,15 +33,15 @@ using namespace vespalib; using search::index::DummyFileHeaderContext; -typedef search::attribute::Config AVConfig; -typedef search::attribute::BasicType AVBasicType; -typedef search::attribute::CollectionType AVCollectionType; +using AVConfig = search::attribute::Config; +using AVBasicType = search::attribute::BasicType; +using AVCollectionType = search::attribute::CollectionType; using searchcorespi::IFlushTarget; using searchcorespi::FlushStats; using std::chrono::duration_cast; using namespace std::literals; -typedef std::shared_ptr<Gate> GateSP; +using GateSP = std::shared_ptr<Gate>; namespace proton { diff --git a/searchcore/src/tests/proton/attribute/attributes_state_explorer/attributes_state_explorer_test.cpp b/searchcore/src/tests/proton/attribute/attributes_state_explorer/attributes_state_explorer_test.cpp index a7d41b6234c..bcd200cfd2f 100644 --- a/searchcore/src/tests/proton/attribute/attributes_state_explorer/attributes_state_explorer_test.cpp +++ b/searchcore/src/tests/proton/attribute/attributes_state_explorer/attributes_state_explorer_test.cpp @@ -86,7 +86,7 @@ struct AttributesStateExplorerTest : public ::testing::Test }; -typedef std::vector<vespalib::string> StringVector; +using StringVector = std::vector<vespalib::string>; TEST_F(AttributesStateExplorerTest, require_that_attributes_are_exposed_as_children_names) { diff --git a/searchcore/src/tests/proton/attribute/document_field_populator/document_field_populator_test.cpp b/searchcore/src/tests/proton/attribute/document_field_populator/document_field_populator_test.cpp index e831e8b2ac7..77135501b55 100644 --- a/searchcore/src/tests/proton/attribute/document_field_populator/document_field_populator_test.cpp +++ b/searchcore/src/tests/proton/attribute/document_field_populator/document_field_populator_test.cpp @@ -18,8 +18,8 @@ using namespace proton; using namespace search; using search::test::DocBuilder; -typedef search::attribute::Config AVConfig; -typedef search::attribute::BasicType AVBasicType; +using AVConfig = search::attribute::Config; +using AVBasicType = search::attribute::BasicType; struct DocContext { diff --git a/searchcore/src/tests/proton/bucketdb/bucketdb/bucketdb_test.cpp b/searchcore/src/tests/proton/bucketdb/bucketdb/bucketdb_test.cpp index 6d14c8b81df..4931fd86914 100644 --- a/searchcore/src/tests/proton/bucketdb/bucketdb/bucketdb_test.cpp +++ b/searchcore/src/tests/proton/bucketdb/bucketdb/bucketdb_test.cpp @@ -29,8 +29,8 @@ const Timestamp TIME_3(3u); constexpr uint32_t DOCSIZE_1(4096u); constexpr uint32_t DOCSIZE_2(10000u); -typedef BucketInfo::ReadyState RS; -typedef SubDbType SDT; +using RS = BucketInfo::ReadyState; +using SDT = SubDbType; namespace { diff --git a/searchcore/src/tests/proton/common/attribute_updater/attribute_updater_test.cpp b/searchcore/src/tests/proton/common/attribute_updater/attribute_updater_test.cpp index e367df3abbd..8c90b189b69 100644 --- a/searchcore/src/tests/proton/common/attribute_updater/attribute_updater_test.cpp +++ b/searchcore/src/tests/proton/common/attribute_updater/attribute_updater_test.cpp @@ -60,10 +60,10 @@ using vespalib::eval::ValueType; namespace search { -typedef AttributeVector::SP AttributePtr; -typedef AttributeVector::WeightedInt WeightedInt; -typedef AttributeVector::WeightedFloat WeightedFloat; -typedef AttributeVector::WeightedString WeightedString; +using AttributePtr = AttributeVector::SP; +using WeightedInt = AttributeVector::WeightedInt; +using WeightedFloat = AttributeVector::WeightedFloat; +using WeightedString = AttributeVector::WeightedString; std::unique_ptr<DocumentTypeRepo> makeDocumentTypeRepo() diff --git a/searchcore/src/tests/proton/common/cachedselect_test.cpp b/searchcore/src/tests/proton/common/cachedselect_test.cpp index 64c95c36350..6565ec601e6 100644 --- a/searchcore/src/tests/proton/common/cachedselect_test.cpp +++ b/searchcore/src/tests/proton/common/cachedselect_test.cpp @@ -70,7 +70,7 @@ using SessionUP = std::unique_ptr<CachedSelect::Session>; extern template class SingleValueNumericPostingAttribute<IntPostingAttribute>; #endif -typedef SingleValueNumericPostingAttribute<IntEnumAttribute> SvIntAttr; +using SvIntAttr = SingleValueNumericPostingAttribute<IntEnumAttribute>; namespace { @@ -232,12 +232,12 @@ public: class MyDB { public: - typedef std::unique_ptr<MyDB> UP; + using UP = std::unique_ptr<MyDB>; const DocumentTypeRepo &_repo; MyAttributeManager &_amgr; - typedef std::map<string, uint32_t> DocIdToLid; - typedef std::map<uint32_t, Document::SP> LidToDocSP; + using DocIdToLid = std::map<string, uint32_t>; + using LidToDocSP = std::map<uint32_t, Document::SP>; DocIdToLid _docIdToLid; LidToDocSP _lidToDocSP; diff --git a/searchcore/src/tests/proton/common/selectpruner_test.cpp b/searchcore/src/tests/proton/common/selectpruner_test.cpp index 3cb8389a4ea..4bc7ef53d94 100644 --- a/searchcore/src/tests/proton/common/selectpruner_test.cpp +++ b/searchcore/src/tests/proton/common/selectpruner_test.cpp @@ -35,7 +35,7 @@ using search::attribute::CollectionType; using search::attribute::test::MockAttributeManager; using search::AttributeFactory; -typedef Node::UP NodeUP; +using NodeUP = Node::UP; namespace { diff --git a/searchcore/src/tests/proton/docsummary/docsummary_test.cpp b/searchcore/src/tests/proton/docsummary/docsummary_test.cpp index 9bd3d6dbec5..fbe9de4e767 100644 --- a/searchcore/src/tests/proton/docsummary/docsummary_test.cpp +++ b/searchcore/src/tests/proton/docsummary/docsummary_test.cpp @@ -284,7 +284,7 @@ public: put(const document::Document &doc, const search::DocumentIdT lid) { const document::DocumentId &docId = doc.getId(); - typedef DocumentMetaStore::Result PutRes; + using PutRes = DocumentMetaStore::Result; IDocumentMetaStore &dms = _ddb->getReadySubDB()->getDocumentMetaStoreContext().get(); uint32_t docSize = 1; PutRes putRes(dms.put(docId.getGlobalId(), BucketFactory::getBucketId(docId), diff --git a/searchcore/src/tests/proton/documentdb/combiningfeedview/combiningfeedview_test.cpp b/searchcore/src/tests/proton/documentdb/combiningfeedview/combiningfeedview_test.cpp index a57787d417e..7af4378ff83 100644 --- a/searchcore/src/tests/proton/documentdb/combiningfeedview/combiningfeedview_test.cpp +++ b/searchcore/src/tests/proton/documentdb/combiningfeedview/combiningfeedview_test.cpp @@ -21,11 +21,11 @@ using search::SerialNum; using storage::spi::Timestamp; using namespace proton; -typedef std::vector<IFeedView::SP> FeedViewVector; +using FeedViewVector = std::vector<IFeedView::SP>; struct MyFeedView : public test::DummyFeedView { - typedef std::shared_ptr<MyFeedView> SP; + using SP = std::shared_ptr<MyFeedView>; DocumentMetaStore _metaStore; uint32_t _preparePut; uint32_t _handlePut; diff --git a/searchcore/src/tests/proton/documentdb/document_scan_iterator/document_scan_iterator_test.cpp b/searchcore/src/tests/proton/documentdb/document_scan_iterator/document_scan_iterator_test.cpp index 4825dc6e8a7..2e82b5b9c79 100644 --- a/searchcore/src/tests/proton/documentdb/document_scan_iterator/document_scan_iterator_test.cpp +++ b/searchcore/src/tests/proton/documentdb/document_scan_iterator/document_scan_iterator_test.cpp @@ -13,10 +13,10 @@ using namespace search; using vespalib::make_string; -typedef DocumentMetaStore::Result DMSResult; -typedef DocumentMetaStore::Timestamp Timestamp; -typedef std::set<uint32_t> LidSet; -typedef std::vector<uint32_t> LidVector; +using DMSResult = DocumentMetaStore::Result; +using Timestamp = DocumentMetaStore::Timestamp; +using LidSet = std::set<uint32_t>; +using LidVector = std::vector<uint32_t>; struct Fixture { diff --git a/searchcore/src/tests/proton/documentdb/document_subdbs/document_subdbs_test.cpp b/searchcore/src/tests/proton/documentdb/document_subdbs/document_subdbs_test.cpp index 13cc4030262..ca03a49ea8d 100644 --- a/searchcore/src/tests/proton/documentdb/document_subdbs/document_subdbs_test.cpp +++ b/searchcore/src/tests/proton/documentdb/document_subdbs/document_subdbs_test.cpp @@ -75,12 +75,12 @@ using vespa::config::content::core::BucketspacesConfig; using vespalib::datastore::CompactionStrategy; using proton::index::IndexConfig; -typedef StoreOnlyDocSubDB::Config StoreOnlyConfig; -typedef StoreOnlyDocSubDB::Context StoreOnlyContext; -typedef FastAccessDocSubDB::Config FastAccessConfig; -typedef FastAccessDocSubDB::Context FastAccessContext; -typedef SearchableDocSubDB::Context SearchableContext; -typedef std::vector<AttributeGuard> AttributeGuardList; +using StoreOnlyConfig = StoreOnlyDocSubDB::Config; +using StoreOnlyContext = StoreOnlyDocSubDB::Context; +using FastAccessConfig = FastAccessDocSubDB::Config; +using FastAccessContext = FastAccessDocSubDB::Context; +using SearchableContext = SearchableDocSubDB::Context; +using AttributeGuardList = std::vector<AttributeGuard>; const std::string DOCTYPE_NAME = "searchdocument"; const std::string SUB_NAME = "subdb"; @@ -282,7 +282,7 @@ make_all_attr_schema(bool has_attr2) struct MyConfigSnapshot { - typedef std::unique_ptr<MyConfigSnapshot> UP; + using UP = std::unique_ptr<MyConfigSnapshot>; Schema _schema; DocBuilder _builder; DocumentDBConfig::SP _cfg; @@ -410,11 +410,11 @@ template <bool has_attr2_in, typename ConfigDirT, uint32_t ConfigSerial = CFG_SE struct BaseTraitsT { static constexpr bool has_attr2 = has_attr2_in; - typedef ConfigDirT ConfigDir; + using ConfigDir = ConfigDirT; static uint32_t configSerial() { return ConfigSerial; } }; -typedef BaseTraitsT<one_attr_schema, ConfigDir1> BaseTraits; +using BaseTraits = BaseTraitsT<one_attr_schema, ConfigDir1>; struct StoreOnlyTraits : public BaseTraits { @@ -424,7 +424,7 @@ struct StoreOnlyTraits : public BaseTraits using FeedView = StoreOnlyFeedView; }; -typedef FixtureBase<StoreOnlyTraits> StoreOnlyFixture; +using StoreOnlyFixture = FixtureBase<StoreOnlyTraits>; struct FastAccessTraits : public BaseTraits { @@ -434,7 +434,7 @@ struct FastAccessTraits : public BaseTraits using FeedView = FastAccessFeedView; }; -typedef FixtureBase<FastAccessTraits> FastAccessFixture; +using FastAccessFixture = FixtureBase<FastAccessTraits>; template <typename ConfigDirT> struct FastAccessOnlyTraitsBase : public BaseTraitsT<two_attr_schema, ConfigDirT> @@ -446,8 +446,8 @@ struct FastAccessOnlyTraitsBase : public BaseTraitsT<two_attr_schema, ConfigDirT }; // Setup with 1 fast-access attribute -typedef FastAccessOnlyTraitsBase<ConfigDir3> FastAccessOnlyTraits; -typedef FixtureBase<FastAccessOnlyTraits> FastAccessOnlyFixture; +using FastAccessOnlyTraits = FastAccessOnlyTraitsBase<ConfigDir3>; +using FastAccessOnlyFixture = FixtureBase<FastAccessOnlyTraits>; template <bool has_attr2_in, typename ConfigDirT> struct SearchableTraitsBase : public BaseTraitsT<has_attr2_in, ConfigDirT> @@ -458,8 +458,8 @@ struct SearchableTraitsBase : public BaseTraitsT<has_attr2_in, ConfigDirT> using FeedView = proton::SearchableFeedView; }; -typedef SearchableTraitsBase<one_attr_schema, ConfigDir1> SearchableTraits; -typedef FixtureBase<SearchableTraits> SearchableFixture; +using SearchableTraits = SearchableTraitsBase<one_attr_schema, ConfigDir1>; +using SearchableFixture = FixtureBase<SearchableTraits>; void assertAttributes1(const AttributeGuardList &attributes) @@ -711,8 +711,8 @@ getFlushTargets(Fixture &f) return targets; } -typedef IFlushTarget::Type FType; -typedef IFlushTarget::Component FComponent; +using FType = IFlushTarget::Type; +using FComponent = IFlushTarget::Component; bool assertTarget(const vespalib::string &name, @@ -927,8 +927,8 @@ TEST_F("require that fast-access attributes are populated during reprocessing", } // Setup with 2 fields (1 attribute according to config in dir) -typedef SearchableTraitsBase<two_attr_schema, ConfigDir1> SearchableTraitsTwoField; -typedef FixtureBase<SearchableTraitsTwoField> SearchableFixtureTwoField; +using SearchableTraitsTwoField = SearchableTraitsBase<two_attr_schema, ConfigDir1>; +using SearchableFixtureTwoField = FixtureBase<SearchableTraitsTwoField>; TEST_F("require that regular attributes are populated during reprocessing", SearchableFixtureTwoField) @@ -1009,10 +1009,10 @@ struct ExplorerFixture : public FixtureType } }; -typedef ExplorerFixture<StoreOnlyFixture> StoreOnlyExplorerFixture; -typedef ExplorerFixture<FastAccessFixture> FastAccessExplorerFixture; -typedef ExplorerFixture<SearchableFixture> SearchableExplorerFixture; -typedef std::vector<vespalib::string> StringVector; +using StoreOnlyExplorerFixture = ExplorerFixture<StoreOnlyFixture>; +using FastAccessExplorerFixture = ExplorerFixture<FastAccessFixture>; +using SearchableExplorerFixture = ExplorerFixture<SearchableFixture>; +using StringVector = std::vector<vespalib::string>; void assertExplorer(const StringVector &extraNames, const vespalib::StateExplorer &explorer) diff --git a/searchcore/src/tests/proton/documentdb/documentdbconfigscout/documentdbconfigscout_test.cpp b/searchcore/src/tests/proton/documentdb/documentdbconfigscout/documentdbconfigscout_test.cpp index 3a0ae8576ca..08d4c7d7773 100644 --- a/searchcore/src/tests/proton/documentdb/documentdbconfigscout/documentdbconfigscout_test.cpp +++ b/searchcore/src/tests/proton/documentdb/documentdbconfigscout/documentdbconfigscout_test.cpp @@ -15,7 +15,7 @@ using namespace vespa::config::search; using std::shared_ptr; using std::make_shared; -typedef shared_ptr<DocumentDBConfig> DDBCSP; +using DDBCSP = shared_ptr<DocumentDBConfig>; namespace { diff --git a/searchcore/src/tests/proton/documentdb/feedhandler/feedhandler_test.cpp b/searchcore/src/tests/proton/documentdb/feedhandler/feedhandler_test.cpp index d31ae33dd15..2c396f8c946 100644 --- a/searchcore/src/tests/proton/documentdb/feedhandler/feedhandler_test.cpp +++ b/searchcore/src/tests/proton/documentdb/feedhandler/feedhandler_test.cpp @@ -75,7 +75,7 @@ using vespalib::eval::ValueType; using namespace proton; using namespace search::index; -typedef std::unique_ptr<vespalib::CountDownLatch> CountDownLatchUP; +using CountDownLatchUP = std::unique_ptr<vespalib::CountDownLatch>; namespace { @@ -83,7 +83,7 @@ struct Rendezvous { vespalib::Gate enter; vespalib::Gate leave; vespalib::Gate gone; - typedef std::unique_ptr<Rendezvous> UP; + using UP = std::unique_ptr<Rendezvous>; Rendezvous() : enter(), leave(), gone() {} bool run(vespalib::duration timeout = 80s) { enter.countDown(); diff --git a/searchcore/src/tests/proton/documentdb/feedview/feedview_test.cpp b/searchcore/src/tests/proton/documentdb/feedview/feedview_test.cpp index b52078e98ec..fdfa7522350 100644 --- a/searchcore/src/tests/proton/documentdb/feedview/feedview_test.cpp +++ b/searchcore/src/tests/proton/documentdb/feedview/feedview_test.cpp @@ -62,8 +62,8 @@ using vespalib::eval::ValueType; using namespace proton; using namespace search::index; -typedef SearchableFeedView::SerialNum SerialNum; -typedef search::DocumentIdT DocumentIdT; +using SerialNum = SearchableFeedView::SerialNum; +using DocumentIdT = search::DocumentIdT; struct MyLidVector : public std::vector<DocumentIdT> { @@ -225,7 +225,7 @@ public: struct MyDocumentStore : public test::DummyDocumentStore { - typedef std::map<DocumentIdT, document::Document::SP> DocMap; + using DocMap = std::map<DocumentIdT, document::Document::SP>; const document::DocumentTypeRepo & _repo; DocMap _docs; uint64_t _lastSyncToken; @@ -462,7 +462,7 @@ struct DocumentContext DocumentUpdate::SP upd; BucketId bid; Timestamp ts; - typedef std::vector<DocumentContext> List; + using List = std::vector<DocumentContext>; DocumentContext(const vespalib::string &docId, uint64_t timestamp, DocBuilder &builder); ~DocumentContext(); void addFieldUpdate(DocBuilder &builder, const vespalib::string &fieldName) { @@ -488,8 +488,8 @@ struct FeedTokenContext { MyTransport mt; FeedToken ft; - typedef std::shared_ptr<FeedTokenContext> SP; - typedef std::vector<SP> List; + using SP = std::shared_ptr<FeedTokenContext>; + using List = std::vector<SP>; FeedTokenContext(MyTracer &tracer); ~FeedTokenContext(); }; diff --git a/searchcore/src/tests/proton/documentdb/fileconfigmanager/fileconfigmanager_test.cpp b/searchcore/src/tests/proton/documentdb/fileconfigmanager/fileconfigmanager_test.cpp index e1ec5916291..99915a1b50f 100644 --- a/searchcore/src/tests/proton/documentdb/fileconfigmanager/fileconfigmanager_test.cpp +++ b/searchcore/src/tests/proton/documentdb/fileconfigmanager/fileconfigmanager_test.cpp @@ -34,8 +34,8 @@ using proton::matching::RankingConstants; using proton::matching::RankingExpressions; using proton::matching::OnnxModels; -typedef DocumentDBConfigHelper DBCM; -typedef DocumentDBConfig::DocumenttypesConfigSP DocumenttypesConfigSP; +using DBCM = DocumentDBConfigHelper; +using DocumenttypesConfigSP = DocumentDBConfig::DocumenttypesConfigSP; using vespalib::nbostream; vespalib::string myId("myconfigid"); diff --git a/searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp b/searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp index 95f03558231..0234d5fbedf 100644 --- a/searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp +++ b/searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp @@ -73,7 +73,7 @@ using storage::spi::dummy::DummyBucketExecutor; using BlockedReason = IBlockableMaintenanceJob::BlockedReason; -typedef BucketId::List BucketIdVector; +using BucketIdVector = BucketId::List; constexpr vespalib::duration TIMEOUT = 60s; @@ -92,7 +92,7 @@ sampleThreadId(FastOS_ThreadId *threadId) class MyDocumentSubDB { - typedef std::map<DocumentIdT, Document::SP> DocMap; + using DocMap = std::map<DocumentIdT, Document::SP>; DocMap _docs; uint32_t _subDBId; DocumentMetaStore::SP _metaStoreSP; @@ -441,7 +441,7 @@ void MyDocumentSubDB::handlePruneRemovedDocuments(const PruneRemovedDocumentsOperation &op) { assert(_subDBId == 1u); - typedef LidVectorContext::LidVector LidVector; + using LidVector = LidVectorContext::LidVector; const SerialNum serialNum = op.getSerialNum(); const LidVectorContext &lidCtx = *op.getLidsToRemove(); const LidVector &lidsToRemove(lidCtx.getLidVector()); @@ -464,7 +464,7 @@ MyDocumentSubDB::handlePut(PutOperation &op) bool needCommit = false; if (op.getValidDbdId(_subDBId)) { - typedef DocumentMetaStore::Result PutRes; + using PutRes = DocumentMetaStore::Result; PutRes putRes(_metaStore.put(gid, op.getBucketId(), @@ -506,7 +506,7 @@ MyDocumentSubDB::handleRemove(RemoveOperationWithDocId &op) bool needCommit = false; if (op.getValidDbdId(_subDBId)) { - typedef DocumentMetaStore::Result PutRes; + using PutRes = DocumentMetaStore::Result; PutRes putRes(_metaStore.put(gid, op.getBucketId(), @@ -564,7 +564,7 @@ MyDocumentSubDB::handleMove(const MoveOperation &op) bool needCommit = false; if (op.getValidDbdId(_subDBId)) { - typedef DocumentMetaStore::Result PutRes; + using PutRes = DocumentMetaStore::Result; PutRes putRes(_metaStore.put(gid, op.getBucketId(), diff --git a/searchcore/src/tests/proton/documentmetastore/documentmetastore_test.cpp b/searchcore/src/tests/proton/documentmetastore/documentmetastore_test.cpp index 04dfdb7f7ff..bb0eb89013c 100644 --- a/searchcore/src/tests/proton/documentmetastore/documentmetastore_test.cpp +++ b/searchcore/src/tests/proton/documentmetastore/documentmetastore_test.cpp @@ -640,8 +640,8 @@ void requireThatBasicBucketInfoWorks() { DocumentMetaStore dms(createBucketDB()); - typedef std::pair<BucketId, GlobalId> Elem; - typedef std::map<Elem, Timestamp> Map; + using Elem = std::pair<BucketId, GlobalId>; + using Map = std::map<Elem, Timestamp>; Map m; uint32_t numLids = 2000; dms.constructFreeList(); @@ -1068,7 +1068,7 @@ SplitAndJoinEmptyFixture::~SplitAndJoinEmptyFixture() struct SplitAndJoinFixture : public SplitAndJoinEmptyFixture { - typedef std::map<BucketId, GlobalIdVector> BucketMap; + using BucketMap = std::map<BucketId, GlobalIdVector>; GlobalIdVector gids; BucketMap bid1s; BucketMap bid2s; diff --git a/searchcore/src/tests/proton/feedoperation/feedoperation_test.cpp b/searchcore/src/tests/proton/feedoperation/feedoperation_test.cpp index 6c1821dc00e..87947788bdf 100644 --- a/searchcore/src/tests/proton/feedoperation/feedoperation_test.cpp +++ b/searchcore/src/tests/proton/feedoperation/feedoperation_test.cpp @@ -46,7 +46,7 @@ using namespace proton; namespace { struct MyStreamHandler : NewConfigOperation::IStreamHandler { - typedef NewConfigOperation::SerialNum SerialNum; + using SerialNum = NewConfigOperation::SerialNum; virtual void serializeConfig(SerialNum, vespalib::nbostream &) override {} virtual void deserializeConfig(SerialNum, vespalib::nbostream &) override {} }; diff --git a/searchcore/src/tests/proton/flushengine/flushengine_test.cpp b/searchcore/src/tests/proton/flushengine/flushengine_test.cpp index d795ed95550..a7efe2952eb 100644 --- a/searchcore/src/tests/proton/flushengine/flushengine_test.cpp +++ b/searchcore/src/tests/proton/flushengine/flushengine_test.cpp @@ -119,7 +119,7 @@ public: FlushDoneHistory _flushDoneHistory; public: - typedef std::shared_ptr<SimpleHandler> SP; + using SP = std::shared_ptr<SimpleHandler>; SimpleHandler(const Targets &targets, const std::string &name = "anon", search::SerialNum currentSerial = -1) @@ -298,7 +298,7 @@ public: mutable bool _serial; public: - typedef std::shared_ptr<AssertedTarget> SP; + using SP = std::shared_ptr<AssertedTarget>; AssertedTarget() : SimpleTarget("anon"), @@ -348,7 +348,7 @@ public: public: - typedef std::shared_ptr<SimpleStrategy> SP; + using SP = std::shared_ptr<SimpleStrategy>; SimpleStrategy() noexcept : _targets() {} diff --git a/searchcore/src/tests/proton/index/index_writer/index_writer_test.cpp b/searchcore/src/tests/proton/index/index_writer/index_writer_test.cpp index 7a135e46937..6ff63223231 100644 --- a/searchcore/src/tests/proton/index/index_writer/index_writer_test.cpp +++ b/searchcore/src/tests/proton/index/index_writer/index_writer_test.cpp @@ -32,7 +32,7 @@ toString(const std::vector<SerialNum> &vec) struct MyIndexManager : public proton::test::MockIndexManager { - typedef std::map<uint32_t, std::vector<SerialNum> > LidMap; + using LidMap = std::map<uint32_t, std::vector<SerialNum> >; LidMap puts; LidMap removes; SerialNum current; diff --git a/searchcore/src/tests/proton/matchengine/matchengine.cpp b/searchcore/src/tests/proton/matchengine/matchengine.cpp index 34c36fd9a72..514c9038945 100644 --- a/searchcore/src/tests/proton/matchengine/matchengine.cpp +++ b/searchcore/src/tests/proton/matchengine/matchengine.cpp @@ -116,7 +116,7 @@ TEST("requireThatCorrectHandlerIsUsed") } struct ObserveBundleMatchHandler : MySearchHandler { - typedef std::shared_ptr<ObserveBundleMatchHandler> SP; + using SP = std::shared_ptr<ObserveBundleMatchHandler>; mutable size_t bundleSize; ObserveBundleMatchHandler() : bundleSize(0) {} diff --git a/searchcore/src/tests/proton/matching/docid_range_scheduler/docid_range_scheduler_bench.cpp b/searchcore/src/tests/proton/matching/docid_range_scheduler/docid_range_scheduler_bench.cpp index c85ef7f3446..5efc85c233d 100644 --- a/searchcore/src/tests/proton/matching/docid_range_scheduler/docid_range_scheduler_bench.cpp +++ b/searchcore/src/tests/proton/matching/docid_range_scheduler/docid_range_scheduler_bench.cpp @@ -49,7 +49,7 @@ TEST("measure do_work overhead for different cost inputs") { //----------------------------------------------------------------------------- struct Work { - typedef std::unique_ptr<Work> UP; + using UP = std::unique_ptr<Work>; virtual vespalib::string desc() const = 0; virtual void perform(uint32_t docid) const = 0; virtual ~Work() {} @@ -102,7 +102,7 @@ struct WorkList { //----------------------------------------------------------------------------- struct SchedulerFactory { - typedef std::unique_ptr<SchedulerFactory> UP; + using UP = std::unique_ptr<SchedulerFactory>; virtual vespalib::string desc() const = 0; virtual DocidRangeScheduler::UP create(uint32_t docid_limit) const = 0; virtual ~SchedulerFactory() {} diff --git a/searchcore/src/tests/proton/matching/querynodes_test.cpp b/searchcore/src/tests/proton/matching/querynodes_test.cpp index 14014853cc9..c73483efed5 100644 --- a/searchcore/src/tests/proton/matching/querynodes_test.cpp +++ b/searchcore/src/tests/proton/matching/querynodes_test.cpp @@ -112,7 +112,7 @@ public: return SearchType::create(std::move(_children), _strict).release(); } }; -typedef Create<OrSearch> MyOr; +using MyOr = Create<OrSearch>; class ISourceSelectorDummy : public ISourceSelector { @@ -130,7 +130,7 @@ public: ISourceSelector::SourceStore ISourceSelectorDummy::_sourceStoreDummy("foo"); -typedef uint32_t SourceId; +using SourceId = uint32_t; class Blender { bool _strict; SourceBlenderSearch::Children _children; @@ -212,7 +212,7 @@ public: template <typename Tag> string getIteratorAsString(); }; -typedef QueryBuilder<ProtonNodeTypes> QB; +using QB = QueryBuilder<ProtonNodeTypes>; struct Phrase { void addToBuilder(QB& b) { b.addPhrase(2, view, id, weight); }}; struct SameElement { void addToBuilder(QB& b) { b.addSameElement(2, view); }}; struct Near { void addToBuilder(QB& b) { b.addNear(2, distance); } }; diff --git a/searchcore/src/tests/proton/metrics/documentdb_job_trackers/documentdb_job_trackers_test.cpp b/searchcore/src/tests/proton/metrics/documentdb_job_trackers/documentdb_job_trackers_test.cpp index e5aa17f10a9..8e1996be29e 100644 --- a/searchcore/src/tests/proton/metrics/documentdb_job_trackers/documentdb_job_trackers_test.cpp +++ b/searchcore/src/tests/proton/metrics/documentdb_job_trackers/documentdb_job_trackers_test.cpp @@ -14,8 +14,8 @@ using namespace searchcorespi; constexpr double EPS = 0.000001; -typedef IFlushTarget::Type FTT; -typedef IFlushTarget::Component FTC; +using FTT = IFlushTarget::Type; +using FTC = IFlushTarget::Component; struct MFT : public test::DummyFlushTarget { diff --git a/searchcore/src/tests/proton/metrics/job_tracked_flush/job_tracked_flush_test.cpp b/searchcore/src/tests/proton/metrics/job_tracked_flush/job_tracked_flush_test.cpp index 340108c3d69..5c966c6d327 100644 --- a/searchcore/src/tests/proton/metrics/job_tracked_flush/job_tracked_flush_test.cpp +++ b/searchcore/src/tests/proton/metrics/job_tracked_flush/job_tracked_flush_test.cpp @@ -35,7 +35,7 @@ struct MyFlushTask : public searchcorespi::FlushTask struct MyFlushTarget : public test::DummyFlushTarget { - typedef std::shared_ptr<MyFlushTarget> SP; + using SP = std::shared_ptr<MyFlushTarget>; SerialNum _initFlushSerial; Gate _execGate; Gate _initGate; diff --git a/searchcore/src/tests/proton/persistenceengine/persistenceengine_test.cpp b/searchcore/src/tests/proton/persistenceengine/persistenceengine_test.cpp index cf58056cae8..e9fd4fa9d37 100644 --- a/searchcore/src/tests/proton/persistenceengine/persistenceengine_test.cpp +++ b/searchcore/src/tests/proton/persistenceengine/persistenceengine_test.cpp @@ -82,8 +82,8 @@ createClusterState(const storage::lib::State& nodeState = storage::lib::State::U using storage::lib::NodeType; using storage::lib::State; using vespa::config::content::StorDistributionConfigBuilder; - typedef StorDistributionConfigBuilder::Group Group; - typedef Group::Nodes Nodes; + using Group = StorDistributionConfigBuilder::Group; + using Nodes = Group::Nodes; storage::lib::ClusterState cstate; StorDistributionConfigBuilder dc; diff --git a/searchcore/src/tests/proton/reprocessing/attribute_reprocessing_initializer/attribute_reprocessing_initializer_test.cpp b/searchcore/src/tests/proton/reprocessing/attribute_reprocessing_initializer/attribute_reprocessing_initializer_test.cpp index 46796738fa8..b7ca199f6dc 100644 --- a/searchcore/src/tests/proton/reprocessing/attribute_reprocessing_initializer/attribute_reprocessing_initializer_test.cpp +++ b/searchcore/src/tests/proton/reprocessing/attribute_reprocessing_initializer/attribute_reprocessing_initializer_test.cpp @@ -38,9 +38,9 @@ using vespalib::ForegroundThreadExecutor; const vespalib::string TEST_DIR = "test_output"; const SerialNum INIT_SERIAL_NUM = 10; -typedef std::vector<vespalib::string> StringVector; -typedef std::set<vespalib::string> StringSet; -typedef AttributeReprocessingInitializer::Config ARIConfig; +using StringVector = std::vector<vespalib::string>; +using StringSet = std::set<vespalib::string>; +using ARIConfig = AttributeReprocessingInitializer::Config; struct MyReprocessingHandler : public IReprocessingHandler { diff --git a/searchcore/src/tests/proton/reprocessing/document_reprocessing_handler/document_reprocessing_handler_test.cpp b/searchcore/src/tests/proton/reprocessing/document_reprocessing_handler/document_reprocessing_handler_test.cpp index 0755a172945..5c5e60547ec 100644 --- a/searchcore/src/tests/proton/reprocessing/document_reprocessing_handler/document_reprocessing_handler_test.cpp +++ b/searchcore/src/tests/proton/reprocessing/document_reprocessing_handler/document_reprocessing_handler_test.cpp @@ -13,7 +13,7 @@ using search::test::DocBuilder; template <typename ReprocessingType> struct MyProcessor : public ReprocessingType { - typedef std::shared_ptr<MyProcessor<ReprocessingType> > SP; + using SP = std::shared_ptr<MyProcessor<ReprocessingType> >; uint32_t _lid; DocumentId _docId; @@ -24,8 +24,8 @@ struct MyProcessor : public ReprocessingType } }; -typedef MyProcessor<IReprocessingReader> MyReader; -typedef MyProcessor<IReprocessingRewriter> MyRewriter; +using MyReader = MyProcessor<IReprocessingReader>; +using MyRewriter = MyProcessor<IReprocessingRewriter>; const vespalib::string DOC_ID = "id:test:searchdocument::0"; diff --git a/searchcore/src/tests/proton/reprocessing/reprocessing_runner/reprocessing_runner_test.cpp b/searchcore/src/tests/proton/reprocessing/reprocessing_runner/reprocessing_runner_test.cpp index 2a9d5d371b2..c3acc99a3b2 100644 --- a/searchcore/src/tests/proton/reprocessing/reprocessing_runner/reprocessing_runner_test.cpp +++ b/searchcore/src/tests/proton/reprocessing/reprocessing_runner/reprocessing_runner_test.cpp @@ -17,7 +17,7 @@ struct Fixture } }; -typedef ReprocessingRunner::ReprocessingTasks TaskList; +using TaskList = ReprocessingRunner::ReprocessingTasks; struct MyTask : public IReprocessingTask { diff --git a/searchcore/src/tests/proton/server/documentretriever_test.cpp b/searchcore/src/tests/proton/server/documentretriever_test.cpp index bf277f86367..6cc2ca22531 100644 --- a/searchcore/src/tests/proton/server/documentretriever_test.cpp +++ b/searchcore/src/tests/proton/server/documentretriever_test.cpp @@ -341,7 +341,7 @@ struct Fixture { _dtName(doc_type_name), _retriever() { - typedef DocumentMetaStore::Result Result; + using Result = DocumentMetaStore::Result; meta_store.constructFreeList(); Result inspect = meta_store.get().inspect(gid, 0u); uint32_t docSize = 1; diff --git a/searchcore/src/vespa/searchcore/grouping/groupingsession.h b/searchcore/src/vespa/searchcore/grouping/groupingsession.h index f58d667446d..bab98a5c709 100644 --- a/searchcore/src/vespa/searchcore/grouping/groupingsession.h +++ b/searchcore/src/vespa/searchcore/grouping/groupingsession.h @@ -33,7 +33,7 @@ private: vespalib::steady_time _timeOfDoom; public: - typedef std::unique_ptr<GroupingSession> UP; + using UP = std::unique_ptr<GroupingSession>; /** * Create a new grouping session diff --git a/searchcore/src/vespa/searchcore/grouping/sessionid.h b/searchcore/src/vespa/searchcore/grouping/sessionid.h index 6f6097f1e9a..6755d4f6988 100644 --- a/searchcore/src/vespa/searchcore/grouping/sessionid.h +++ b/searchcore/src/vespa/searchcore/grouping/sessionid.h @@ -4,15 +4,13 @@ #include <vespa/vespalib/stllike/string.h> -namespace search { -namespace grouping { +namespace search::grouping { /** * Representing the session identifier of a grouping to be used in the * session manager. **/ -typedef vespalib::string SessionId; +using SessionId = vespalib::string; -} // namespace grouping -} // namespace search +} diff --git a/searchcore/src/vespa/searchcore/proton/attribute/attribute_collection_spec.h b/searchcore/src/vespa/searchcore/proton/attribute/attribute_collection_spec.h index 73f1febd822..1ee9e92ce8c 100644 --- a/searchcore/src/vespa/searchcore/proton/attribute/attribute_collection_spec.h +++ b/searchcore/src/vespa/searchcore/proton/attribute/attribute_collection_spec.h @@ -17,7 +17,7 @@ public: using AttributeList = std::vector<AttributeSpec>; private: - typedef search::SerialNum SerialNum; + using SerialNum = search::SerialNum; AttributeList _attributes; uint32_t _docIdLimit; diff --git a/searchcore/src/vespa/searchcore/proton/attribute/attribute_factory.h b/searchcore/src/vespa/searchcore/proton/attribute/attribute_factory.h index ca2a65f77c6..4b8021d1bc0 100644 --- a/searchcore/src/vespa/searchcore/proton/attribute/attribute_factory.h +++ b/searchcore/src/vespa/searchcore/proton/attribute/attribute_factory.h @@ -12,7 +12,7 @@ namespace proton { class AttributeFactory : public IAttributeFactory { public: - typedef std::shared_ptr<AttributeFactory> SP; + using SP = std::shared_ptr<AttributeFactory>; AttributeFactory(); AttributeVectorSP create(const vespalib::string &name, const search::attribute::Config &cfg) const override; diff --git a/searchcore/src/vespa/searchcore/proton/attribute/attribute_initializer.h b/searchcore/src/vespa/searchcore/proton/attribute/attribute_initializer.h index a3844219d24..c83fe404cde 100644 --- a/searchcore/src/vespa/searchcore/proton/attribute/attribute_initializer.h +++ b/searchcore/src/vespa/searchcore/proton/attribute/attribute_initializer.h @@ -21,7 +21,7 @@ struct IAttributeFactory; class AttributeInitializer { public: - typedef std::unique_ptr<AttributeInitializer> UP; + using UP = std::unique_ptr<AttributeInitializer>; private: using AttributeVectorSP = std::shared_ptr<search::AttributeVector>; diff --git a/searchcore/src/vespa/searchcore/proton/attribute/attribute_populator.h b/searchcore/src/vespa/searchcore/proton/attribute/attribute_populator.h index 6be83fb8220..55414195cdc 100644 --- a/searchcore/src/vespa/searchcore/proton/attribute/attribute_populator.h +++ b/searchcore/src/vespa/searchcore/proton/attribute/attribute_populator.h @@ -24,7 +24,7 @@ private: std::vector<vespalib::string> getNames() const; public: - typedef std::shared_ptr<AttributePopulator> SP; + using SP = std::shared_ptr<AttributePopulator>; AttributePopulator(const proton::IAttributeManager::SP &mgr, search::SerialNum initSerialNum, diff --git a/searchcore/src/vespa/searchcore/proton/attribute/attributes_initializer_base.h b/searchcore/src/vespa/searchcore/proton/attribute/attributes_initializer_base.h index 9da268fff21..de300b7bc52 100644 --- a/searchcore/src/vespa/searchcore/proton/attribute/attributes_initializer_base.h +++ b/searchcore/src/vespa/searchcore/proton/attribute/attributes_initializer_base.h @@ -14,7 +14,7 @@ namespace proton { class AttributesInitializerBase : public IAttributeInitializerRegistry { public: - typedef std::vector<AttributeInitializerResult> AttributesVector; + using AttributesVector = std::vector<AttributeInitializerResult>; protected: AttributesVector _initializedAttributes; 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 de35ab7394f..1a10000978e 100644 --- a/searchcore/src/vespa/searchcore/proton/attribute/filter_attribute_manager.h +++ b/searchcore/src/vespa/searchcore/proton/attribute/filter_attribute_manager.h @@ -17,7 +17,7 @@ namespace proton { class FilterAttributeManager : public IAttributeManager { public: - typedef std::set<vespalib::string> AttributeSet; + using AttributeSet = std::set<vespalib::string>; private: AttributeSet _acceptedAttributes; diff --git a/searchcore/src/vespa/searchcore/proton/attribute/flushableattribute.h b/searchcore/src/vespa/searchcore/proton/attribute/flushableattribute.h index e25422792fc..2ae63bef4db 100644 --- a/searchcore/src/vespa/searchcore/proton/attribute/flushableattribute.h +++ b/searchcore/src/vespa/searchcore/proton/attribute/flushableattribute.h @@ -42,7 +42,7 @@ private: Task::UP internalInitFlush(SerialNum currentSerial); public: - typedef std::shared_ptr<FlushableAttribute> SP; + using SP = std::shared_ptr<FlushableAttribute>; /** * Creates a new instance using the given attribute vector and the diff --git a/searchcore/src/vespa/searchcore/proton/attribute/i_attribute_factory.h b/searchcore/src/vespa/searchcore/proton/attribute/i_attribute_factory.h index 858bd64d095..6405ca79a4d 100644 --- a/searchcore/src/vespa/searchcore/proton/attribute/i_attribute_factory.h +++ b/searchcore/src/vespa/searchcore/proton/attribute/i_attribute_factory.h @@ -17,7 +17,7 @@ namespace proton { */ struct IAttributeFactory { - typedef std::shared_ptr<IAttributeFactory> SP; + using SP = std::shared_ptr<IAttributeFactory>; using AttributeVectorSP = std::shared_ptr<search::AttributeVector>; virtual ~IAttributeFactory() {} virtual AttributeVectorSP create(const vespalib::string &name, diff --git a/searchcore/src/vespa/searchcore/proton/bucketdb/bucketsessionbase.h b/searchcore/src/vespa/searchcore/proton/bucketdb/bucketsessionbase.h index db7470eae7c..b2fb07c2e68 100644 --- a/searchcore/src/vespa/searchcore/proton/bucketdb/bucketsessionbase.h +++ b/searchcore/src/vespa/searchcore/proton/bucketdb/bucketsessionbase.h @@ -15,9 +15,9 @@ class IBucketCreateNotifier; class BucketSessionBase { public: - typedef document::GlobalId GlobalId; - typedef document::BucketId BucketId; - typedef storage::spi::Timestamp Timestamp; + using GlobalId = document::GlobalId; + using BucketId = document::BucketId; + using Timestamp = storage::spi::Timestamp; protected: Guard _bucketDB; diff --git a/searchcore/src/vespa/searchcore/proton/bucketdb/ibucketdbhandler.h b/searchcore/src/vespa/searchcore/proton/bucketdb/ibucketdbhandler.h index fd027f64ca2..6aeb91cb88b 100644 --- a/searchcore/src/vespa/searchcore/proton/bucketdb/ibucketdbhandler.h +++ b/searchcore/src/vespa/searchcore/proton/bucketdb/ibucketdbhandler.h @@ -15,7 +15,7 @@ namespace proton::bucketdb { class IBucketDBHandler { public: - typedef document::BucketId BucketId; + using BucketId = document::BucketId; IBucketDBHandler() { } diff --git a/searchcore/src/vespa/searchcore/proton/common/attribute_updater.cpp b/searchcore/src/vespa/searchcore/proton/common/attribute_updater.cpp index e9f6536d50d..6a473df6689 100644 --- a/searchcore/src/vespa/searchcore/proton/common/attribute_updater.cpp +++ b/searchcore/src/vespa/searchcore/proton/common/attribute_updater.cpp @@ -66,27 +66,27 @@ namespace search { } struct GetFloat { - typedef float T; + using T = float; T operator () (const FieldValue & fv) const { return fv.getAsFloat(); } }; struct GetDouble { - typedef double T; + using T = double; T operator () (const FieldValue & fv) const { return fv.getAsDouble(); } }; struct GetLong { - typedef int64_t T; + using T = int64_t; T operator () (const FieldValue & fv) const { return fv.getAsLong(); } }; struct GetInt { - typedef int32_t T; + using T = int32_t; T operator () (const FieldValue & fv) const { return fv.getAsInt(); } }; struct GetString { - typedef vespalib::stringref T; + using T = vespalib::stringref; T operator () (const FieldValue & fv) const { return static_cast<const LiteralFieldValueB &>(fv).getValueRef(); } }; diff --git a/searchcore/src/vespa/searchcore/proton/common/cachedselect.h b/searchcore/src/vespa/searchcore/proton/common/cachedselect.h index cdda29ec301..ba6b397948f 100644 --- a/searchcore/src/vespa/searchcore/proton/common/cachedselect.h +++ b/searchcore/src/vespa/searchcore/proton/common/cachedselect.h @@ -30,7 +30,7 @@ class SelectPruner; class CachedSelect { public: - typedef std::shared_ptr<CachedSelect> SP; + using SP = std::shared_ptr<CachedSelect>; class Session { private: diff --git a/searchcore/src/vespa/searchcore/proton/common/eventlogger.h b/searchcore/src/vespa/searchcore/proton/common/eventlogger.h index d0cb002dd4d..ea767f8966e 100644 --- a/searchcore/src/vespa/searchcore/proton/common/eventlogger.h +++ b/searchcore/src/vespa/searchcore/proton/common/eventlogger.h @@ -13,8 +13,8 @@ namespace proton { **/ class EventLogger { private: - typedef search::SerialNum SerialNum; - typedef vespalib::string string; + using SerialNum = search::SerialNum; + using string = vespalib::string; public: static void transactionLogReplayComplete(const string &domainName, vespalib::duration elapsedTime); static void populateAttributeStart(const std::vector<string> &names); diff --git a/searchcore/src/vespa/searchcore/proton/common/feedtoken.h b/searchcore/src/vespa/searchcore/proton/common/feedtoken.h index 7cc3c7fcc54..1f2ff70d1dd 100644 --- a/searchcore/src/vespa/searchcore/proton/common/feedtoken.h +++ b/searchcore/src/vespa/searchcore/proton/common/feedtoken.h @@ -7,7 +7,7 @@ namespace storage::spi { class Result; } namespace proton { -typedef std::unique_ptr<storage::spi::Result> ResultUP; +using ResultUP = std::unique_ptr<storage::spi::Result>; namespace feedtoken { diff --git a/searchcore/src/vespa/searchcore/proton/common/handlermap.hpp b/searchcore/src/vespa/searchcore/proton/common/handlermap.hpp index 697028e42cc..14b190fe403 100644 --- a/searchcore/src/vespa/searchcore/proton/common/handlermap.hpp +++ b/searchcore/src/vespa/searchcore/proton/common/handlermap.hpp @@ -87,8 +87,8 @@ public: /** * Convenience typedefs. */ - typedef typename StdMap::iterator iterator; - typedef typename StdMap::const_iterator const_iterator; + using iterator = typename StdMap::iterator; + using const_iterator = typename StdMap::const_iterator; /** * Constructs a new instance of this class. diff --git a/searchcore/src/vespa/searchcore/proton/common/i_document_type_inspector.h b/searchcore/src/vespa/searchcore/proton/common/i_document_type_inspector.h index d4491db02b0..f35bc8bb9fa 100644 --- a/searchcore/src/vespa/searchcore/proton/common/i_document_type_inspector.h +++ b/searchcore/src/vespa/searchcore/proton/common/i_document_type_inspector.h @@ -12,7 +12,7 @@ namespace proton { */ struct IDocumentTypeInspector { - typedef std::shared_ptr<IDocumentTypeInspector> SP; + using SP = std::shared_ptr<IDocumentTypeInspector>; virtual ~IDocumentTypeInspector() =default; diff --git a/searchcore/src/vespa/searchcore/proton/common/selectpruner.h b/searchcore/src/vespa/searchcore/proton/common/selectpruner.h index 3b3b6202b72..f82ecf33633 100644 --- a/searchcore/src/vespa/searchcore/proton/common/selectpruner.h +++ b/searchcore/src/vespa/searchcore/proton/common/selectpruner.h @@ -42,8 +42,8 @@ public: private: bool _inverted; bool _wantInverted; - typedef document::select::Node::UP NodeUP; - typedef document::select::ValueNode::UP ValueNodeUP; + using NodeUP = document::select::Node::UP; + using ValueNodeUP = document::select::ValueNode::UP; uint32_t _attrFieldNodes; public: SelectPruner(const vespalib::string &docType, diff --git a/searchcore/src/vespa/searchcore/proton/common/statusreport.h b/searchcore/src/vespa/searchcore/proton/common/statusreport.h index 70481222edf..1ddb4adf432 100644 --- a/searchcore/src/vespa/searchcore/proton/common/statusreport.h +++ b/searchcore/src/vespa/searchcore/proton/common/statusreport.h @@ -14,9 +14,9 @@ namespace proton { */ class StatusReport { public: - typedef std::unique_ptr<StatusReport> UP; - typedef std::shared_ptr<StatusReport> SP; - typedef std::vector<SP> List; + using UP = std::unique_ptr<StatusReport>; + using SP = std::shared_ptr<StatusReport>; + using List = std::vector<SP>; enum State { DOWN = 0, diff --git a/searchcore/src/vespa/searchcore/proton/docsummary/docsumcontext.h b/searchcore/src/vespa/searchcore/proton/docsummary/docsumcontext.h index 509134b4ce1..cb942d07075 100644 --- a/searchcore/src/vespa/searchcore/proton/docsummary/docsumcontext.h +++ b/searchcore/src/vespa/searchcore/proton/docsummary/docsumcontext.h @@ -35,7 +35,7 @@ private: std::unique_ptr<vespalib::Slime> createSlimeReply(); public: - typedef std::unique_ptr<DocsumContext> UP; + using UP = std::unique_ptr<DocsumContext>; DocsumContext(const search::engine::DocsumRequest & request, search::docsummary::IDocsumWriter & docsumWriter, diff --git a/searchcore/src/vespa/searchcore/proton/docsummary/isummarymanager.h b/searchcore/src/vespa/searchcore/proton/docsummary/isummarymanager.h index e4e32209e3a..d392d817105 100644 --- a/searchcore/src/vespa/searchcore/proton/docsummary/isummarymanager.h +++ b/searchcore/src/vespa/searchcore/proton/docsummary/isummarymanager.h @@ -27,8 +27,8 @@ public: */ class ISummarySetup : public search::docsummary::IDocsumEnvironment { public: - typedef std::unique_ptr<ISummarySetup> UP; - typedef std::shared_ptr<ISummarySetup> SP; + using UP = std::unique_ptr<ISummarySetup>; + using SP = std::shared_ptr<ISummarySetup>; ~ISummarySetup() override = default; @@ -37,8 +37,8 @@ public: virtual search::docsummary::IDocsumStore::UP createDocsumStore() = 0; }; - typedef std::unique_ptr<ISummaryManager> UP; - typedef std::shared_ptr<ISummaryManager> SP; + using UP = std::unique_ptr<ISummaryManager>; + using SP = std::shared_ptr<ISummaryManager>; virtual ~ISummaryManager() = default; diff --git a/searchcore/src/vespa/searchcore/proton/docsummary/summarymanager.h b/searchcore/src/vespa/searchcore/proton/docsummary/summarymanager.h index 39df4c5ca70..97ab10e8903 100644 --- a/searchcore/src/vespa/searchcore/proton/docsummary/summarymanager.h +++ b/searchcore/src/vespa/searchcore/proton/docsummary/summarymanager.h @@ -52,7 +52,7 @@ private: std::shared_ptr<search::IDocumentStore> _docStore; public: - typedef std::shared_ptr<SummaryManager> SP; + using SP = std::shared_ptr<SummaryManager>; SummaryManager(vespalib::Executor &shared_executor, const search::LogDocumentStore::Config & summary, const search::GrowStrategy & growStrategy, diff --git a/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastore.h b/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastore.h index ba944e3493d..72a062d85eb 100644 --- a/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastore.h +++ b/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastore.h @@ -37,12 +37,12 @@ class DocumentMetaStore final : public DocumentMetaStoreAttribute, public search::IBucketizer { public: - typedef std::shared_ptr<DocumentMetaStore> SP; - typedef documentmetastore::IStore::Result Result; - typedef documentmetastore::IStore::DocId DocId; - typedef documentmetastore::IStore::GlobalId GlobalId; - typedef documentmetastore::IStore::BucketId BucketId; - typedef documentmetastore::IStore::Timestamp Timestamp; + using SP = std::shared_ptr<DocumentMetaStore>; + using Result = documentmetastore::IStore::Result; + using DocId = documentmetastore::IStore::DocId; + using GlobalId = documentmetastore::IStore::GlobalId; + using BucketId = documentmetastore::IStore::BucketId; + using Timestamp = documentmetastore::IStore::Timestamp; using MetaDataView = vespalib::ConstArrayRef<RawDocumentMetaData>; using UnboundMetaDataView = const RawDocumentMetaData *; @@ -141,8 +141,8 @@ private: void set_shrink_lid_space_blockers(uint32_t value) noexcept { _shrinkLidSpaceBlockers.store(value, std::memory_order_relaxed); } public: - typedef TreeType::Iterator Iterator; - typedef TreeType::ConstIterator ConstIterator; + using Iterator = TreeType::Iterator; + using ConstIterator = TreeType::ConstIterator; static constexpr size_t minHeaderLen = 0x1000; static constexpr size_t entrySize = sizeof(uint32_t) + GlobalId::LENGTH + sizeof(uint8_t) + diff --git a/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastoreflushtarget.h b/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastoreflushtarget.h index ef9f9299791..777d7de1e17 100644 --- a/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastoreflushtarget.h +++ b/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastoreflushtarget.h @@ -41,7 +41,7 @@ private: std::shared_ptr<AttributeDirectory> _dmsDir; public: - typedef std::shared_ptr<DocumentMetaStoreFlushTarget> SP; + using SP = std::shared_ptr<DocumentMetaStoreFlushTarget>; /** * Creates a new instance using the given attribute vector and the diff --git a/searchcore/src/vespa/searchcore/proton/documentmetastore/i_bucket_handler.h b/searchcore/src/vespa/searchcore/proton/documentmetastore/i_bucket_handler.h index 1a0288fea84..8b10973c3c4 100644 --- a/searchcore/src/vespa/searchcore/proton/documentmetastore/i_bucket_handler.h +++ b/searchcore/src/vespa/searchcore/proton/documentmetastore/i_bucket_handler.h @@ -19,7 +19,7 @@ namespace proton::documentmetastore { */ struct IBucketHandler { - typedef document::BucketId BucketId; + using BucketId = document::BucketId; virtual ~IBucketHandler() = default; diff --git a/searchcore/src/vespa/searchcore/proton/documentmetastore/i_document_meta_store_context.h b/searchcore/src/vespa/searchcore/proton/documentmetastore/i_document_meta_store_context.h index e8e681661af..9853c4af5b6 100644 --- a/searchcore/src/vespa/searchcore/proton/documentmetastore/i_document_meta_store_context.h +++ b/searchcore/src/vespa/searchcore/proton/documentmetastore/i_document_meta_store_context.h @@ -12,7 +12,7 @@ namespace proton { */ struct IDocumentMetaStoreContext : public search::IDocumentMetaStoreContext { - typedef std::shared_ptr<IDocumentMetaStoreContext> SP; + using SP = std::shared_ptr<IDocumentMetaStoreContext>; virtual ~IDocumentMetaStoreContext() = default; diff --git a/searchcore/src/vespa/searchcore/proton/documentmetastore/lid_allocator.h b/searchcore/src/vespa/searchcore/proton/documentmetastore/lid_allocator.h index 95a8cf85279..297218d17f8 100644 --- a/searchcore/src/vespa/searchcore/proton/documentmetastore/lid_allocator.h +++ b/searchcore/src/vespa/searchcore/proton/documentmetastore/lid_allocator.h @@ -17,8 +17,8 @@ namespace proton::documentmetastore { class LidAllocator { private: - typedef uint32_t DocId; - typedef vespalib::GenerationHandler::generation_t generation_t; + using DocId = uint32_t; + using generation_t = vespalib::GenerationHandler::generation_t; LidHoldList _holdLids; LidStateVector _freeLids; diff --git a/searchcore/src/vespa/searchcore/proton/documentmetastore/lid_gid_key_comparator.h b/searchcore/src/vespa/searchcore/proton/documentmetastore/lid_gid_key_comparator.h index d53fca12b74..e3f52addedb 100644 --- a/searchcore/src/vespa/searchcore/proton/documentmetastore/lid_gid_key_comparator.h +++ b/searchcore/src/vespa/searchcore/proton/documentmetastore/lid_gid_key_comparator.h @@ -16,7 +16,7 @@ namespace proton::documentmetastore { class LidGidKeyComparator { private: - typedef search::IDocumentMetaStore::DocId DocId; + using DocId = search::IDocumentMetaStore::DocId; using UnboundMetaDataView = const RawDocumentMetaData *; const document::GlobalId &_gid; diff --git a/searchcore/src/vespa/searchcore/proton/documentmetastore/lid_hold_list.h b/searchcore/src/vespa/searchcore/proton/documentmetastore/lid_hold_list.h index 565d8bf25e1..1000a11e6cb 100644 --- a/searchcore/src/vespa/searchcore/proton/documentmetastore/lid_hold_list.h +++ b/searchcore/src/vespa/searchcore/proton/documentmetastore/lid_hold_list.h @@ -16,9 +16,9 @@ class LidStateVector; class LidHoldList { private: - typedef vespalib::GenerationHandler::generation_t generation_t; - typedef std::pair<uint32_t, generation_t> Element; - typedef std::deque<Element> ElementDeque; + using generation_t = vespalib::GenerationHandler::generation_t; + using Element = std::pair<uint32_t, generation_t>; + using ElementDeque = std::deque<Element>; ElementDeque _holdList; diff --git a/searchcore/src/vespa/searchcore/proton/feedoperation/feedoperation.h b/searchcore/src/vespa/searchcore/proton/feedoperation/feedoperation.h index 393f79e15a7..4cfac369956 100644 --- a/searchcore/src/vespa/searchcore/proton/feedoperation/feedoperation.h +++ b/searchcore/src/vespa/searchcore/proton/feedoperation/feedoperation.h @@ -12,9 +12,9 @@ namespace proton { class FeedOperation { public: - typedef search::SerialNum SerialNum; - typedef std::shared_ptr<FeedOperation> SP; - typedef std::unique_ptr<FeedOperation> UP; + using SerialNum = search::SerialNum; + using SP = std::shared_ptr<FeedOperation>; + using UP = std::unique_ptr<FeedOperation>; /* * Enumeration of feed operations. UPDATE_42 is partial update diff --git a/searchcore/src/vespa/searchcore/proton/feedoperation/lidvectorcontext.h b/searchcore/src/vespa/searchcore/proton/feedoperation/lidvectorcontext.h index 7be03491cbe..b72c3a1d172 100644 --- a/searchcore/src/vespa/searchcore/proton/feedoperation/lidvectorcontext.h +++ b/searchcore/src/vespa/searchcore/proton/feedoperation/lidvectorcontext.h @@ -12,7 +12,7 @@ namespace proton { class LidVectorContext { public: - typedef std::vector<search::DocumentIdT> LidVector; + using LidVector = std::vector<search::DocumentIdT>; private: LidVector _result; size_t _docIdLimit; diff --git a/searchcore/src/vespa/searchcore/proton/feedoperation/moveoperation.h b/searchcore/src/vespa/searchcore/proton/feedoperation/moveoperation.h index 3553820b21a..f7451420c4c 100644 --- a/searchcore/src/vespa/searchcore/proton/feedoperation/moveoperation.h +++ b/searchcore/src/vespa/searchcore/proton/feedoperation/moveoperation.h @@ -11,7 +11,7 @@ private: using DocumentSP = std::shared_ptr<document::Document>; DocumentSP _doc; public: - typedef std::unique_ptr<MoveOperation> UP; + using UP = std::unique_ptr<MoveOperation>; MoveOperation(); MoveOperation(const document::BucketId &bucketId, diff --git a/searchcore/src/vespa/searchcore/proton/feedoperation/pruneremoveddocumentsoperation.h b/searchcore/src/vespa/searchcore/proton/feedoperation/pruneremoveddocumentsoperation.h index ba67dca5e72..05fc6b1fed2 100644 --- a/searchcore/src/vespa/searchcore/proton/feedoperation/pruneremoveddocumentsoperation.h +++ b/searchcore/src/vespa/searchcore/proton/feedoperation/pruneremoveddocumentsoperation.h @@ -11,7 +11,7 @@ class PruneRemovedDocumentsOperation : public RemoveDocumentsOperation private: uint32_t _subDbId; public: - typedef std::unique_ptr<PruneRemovedDocumentsOperation> UP; + using UP = std::unique_ptr<PruneRemovedDocumentsOperation>; PruneRemovedDocumentsOperation(); PruneRemovedDocumentsOperation(search::DocumentIdT docIdLimit, uint32_t subDbId); diff --git a/searchcore/src/vespa/searchcore/proton/feedoperation/removedocumentsoperation.h b/searchcore/src/vespa/searchcore/proton/feedoperation/removedocumentsoperation.h index 3bbc2934c27..cdc738afa11 100644 --- a/searchcore/src/vespa/searchcore/proton/feedoperation/removedocumentsoperation.h +++ b/searchcore/src/vespa/searchcore/proton/feedoperation/removedocumentsoperation.h @@ -10,7 +10,7 @@ namespace proton { class RemoveDocumentsOperation : public FeedOperation { protected: - typedef std::map<uint32_t, LidVectorContext::SP> LidsToRemoveMap; + using LidsToRemoveMap = std::map<uint32_t, LidVectorContext::SP>; LidsToRemoveMap _lidsToRemoveMap; RemoveDocumentsOperation(Type type); diff --git a/searchcore/src/vespa/searchcore/proton/flushengine/flushcontext.h b/searchcore/src/vespa/searchcore/proton/flushengine/flushcontext.h index c13d9e042e1..4ef64c9070c 100644 --- a/searchcore/src/vespa/searchcore/proton/flushengine/flushcontext.h +++ b/searchcore/src/vespa/searchcore/proton/flushengine/flushcontext.h @@ -20,8 +20,8 @@ private: search::SerialNum _lastSerial; public: - typedef std::shared_ptr<FlushContext> SP; - typedef std::vector<SP> List; + using SP = std::shared_ptr<FlushContext>; + using List = std::vector<SP>; FlushContext(const FlushContext &) = delete; FlushContext & operator = (const FlushContext &) = delete; diff --git a/searchcore/src/vespa/searchcore/proton/flushengine/iflushhandler.h b/searchcore/src/vespa/searchcore/proton/flushengine/iflushhandler.h index 6c37476541d..cd2bd6d5742 100644 --- a/searchcore/src/vespa/searchcore/proton/flushengine/iflushhandler.h +++ b/searchcore/src/vespa/searchcore/proton/flushengine/iflushhandler.h @@ -15,11 +15,11 @@ private: public: using IFlushTarget = searchcorespi::IFlushTarget; - typedef IFlushTarget::SerialNum SerialNum; + using SerialNum = IFlushTarget::SerialNum; /** * Convenience typedefs. */ - typedef std::shared_ptr<IFlushHandler> SP; + using SP = std::shared_ptr<IFlushHandler>; IFlushHandler(const IFlushHandler &) = delete; IFlushHandler & operator = (const IFlushHandler &) = delete; /** diff --git a/searchcore/src/vespa/searchcore/proton/flushengine/iflushstrategy.h b/searchcore/src/vespa/searchcore/proton/flushengine/iflushstrategy.h index 2c76b71ad13..5f1780c30ed 100644 --- a/searchcore/src/vespa/searchcore/proton/flushengine/iflushstrategy.h +++ b/searchcore/src/vespa/searchcore/proton/flushengine/iflushstrategy.h @@ -17,7 +17,7 @@ class TlsStatsMap; */ class IFlushStrategy { public: - typedef std::shared_ptr<IFlushStrategy> SP; + using SP = std::shared_ptr<IFlushStrategy>; IFlushStrategy(const IFlushStrategy &) = delete; IFlushStrategy & operator = (const IFlushStrategy &) = delete; diff --git a/searchcore/src/vespa/searchcore/proton/index/i_index_writer.h b/searchcore/src/vespa/searchcore/proton/index/i_index_writer.h index a96e344979e..6cda683722f 100644 --- a/searchcore/src/vespa/searchcore/proton/index/i_index_writer.h +++ b/searchcore/src/vespa/searchcore/proton/index/i_index_writer.h @@ -13,8 +13,8 @@ namespace proton { **/ class IIndexWriter { public: - typedef std::unique_ptr<IIndexWriter> UP; - typedef std::shared_ptr<IIndexWriter> SP; + using UP = std::unique_ptr<IIndexWriter>; + using SP = std::shared_ptr<IIndexWriter>; using IIndexManager = searchcorespi::IIndexManager; using OnWriteDoneType = IIndexManager::OnWriteDoneType; using LidVector = std::vector<search::DocumentIdT>; diff --git a/searchcore/src/vespa/searchcore/proton/matchengine/matchengine.h b/searchcore/src/vespa/searchcore/proton/matchengine/matchengine.h index 1fe3a7092ef..2979213979f 100644 --- a/searchcore/src/vespa/searchcore/proton/matchengine/matchengine.h +++ b/searchcore/src/vespa/searchcore/proton/matchengine/matchengine.h @@ -32,8 +32,8 @@ public: /** * Convenience typedefs. */ - typedef std::unique_ptr<MatchEngine> UP; - typedef std::shared_ptr<MatchEngine> SP; + using UP = std::unique_ptr<MatchEngine>; + using SP = std::shared_ptr<MatchEngine>; MatchEngine(const MatchEngine &) = delete; MatchEngine & operator = (const MatchEngine &) = delete; diff --git a/searchcore/src/vespa/searchcore/proton/matching/docid_range_scheduler.h b/searchcore/src/vespa/searchcore/proton/matching/docid_range_scheduler.h index b133d5a5058..177d19b06f9 100644 --- a/searchcore/src/vespa/searchcore/proton/matching/docid_range_scheduler.h +++ b/searchcore/src/vespa/searchcore/proton/matching/docid_range_scheduler.h @@ -104,7 +104,7 @@ public: * passed as input to the 'share_range' function. **/ struct DocidRangeScheduler { - typedef std::unique_ptr<DocidRangeScheduler> UP; + using UP = std::unique_ptr<DocidRangeScheduler>; virtual DocidRange first_range(size_t thread_id) = 0; virtual DocidRange next_range(size_t thread_id) = 0; virtual size_t total_size(size_t thread_id) const = 0; diff --git a/searchcore/src/vespa/searchcore/proton/matching/fakesearchcontext.h b/searchcore/src/vespa/searchcore/proton/matching/fakesearchcontext.h index 659bfc6c6d8..3a9953ff9f9 100644 --- a/searchcore/src/vespa/searchcore/proton/matching/fakesearchcontext.h +++ b/searchcore/src/vespa/searchcore/proton/matching/fakesearchcontext.h @@ -21,7 +21,7 @@ using searchcorespi::IndexCollection; class FakeSearchContext : public ISearchContext { public: - typedef search::queryeval::FakeSearchable FakeSearchable; + using FakeSearchable = search::queryeval::FakeSearchable; private: std::unique_ptr<vespalib::TestClock> _clock; diff --git a/searchcore/src/vespa/searchcore/proton/matching/isearchcontext.h b/searchcore/src/vespa/searchcore/proton/matching/isearchcontext.h index 97ec283d672..51fca51d398 100644 --- a/searchcore/src/vespa/searchcore/proton/matching/isearchcontext.h +++ b/searchcore/src/vespa/searchcore/proton/matching/isearchcontext.h @@ -28,11 +28,11 @@ public: /** * Convenience typedef for an auto pointer to this interface. **/ - typedef std::unique_ptr<ISearchContext> UP; + using UP = std::unique_ptr<ISearchContext>; ISearchContext(const ISearchContext &) = delete; ISearchContext & operator = (const ISearchContext &) = delete; - typedef search::queryeval::Searchable Searchable; + using Searchable = search::queryeval::Searchable; using IndexSearchable = searchcorespi::IndexSearchable; /** diff --git a/searchcore/src/vespa/searchcore/proton/matching/match_context.h b/searchcore/src/vespa/searchcore/proton/matching/match_context.h index b292ec744d6..d3e5a87d34c 100644 --- a/searchcore/src/vespa/searchcore/proton/matching/match_context.h +++ b/searchcore/src/vespa/searchcore/proton/matching/match_context.h @@ -14,7 +14,7 @@ class MatchContext { ISearchContext::UP _searchCtx; public: - typedef std::unique_ptr<MatchContext> UP; + using UP = std::unique_ptr<MatchContext>; MatchContext(IAttributeContext::UP attrCtx, ISearchContext::UP searchCtx) : _attrCtx(std::move(attrCtx)), diff --git a/searchcore/src/vespa/searchcore/proton/matching/match_phase_limiter.h b/searchcore/src/vespa/searchcore/proton/matching/match_phase_limiter.h index ba7f022e8b9..2c40ad9b319 100644 --- a/searchcore/src/vespa/searchcore/proton/matching/match_phase_limiter.h +++ b/searchcore/src/vespa/searchcore/proton/matching/match_phase_limiter.h @@ -42,8 +42,8 @@ private: **/ struct MaybeMatchPhaseLimiter { using Cursor = vespalib::slime::Cursor; - typedef search::queryeval::SearchIterator SearchIterator; - typedef std::unique_ptr<MaybeMatchPhaseLimiter> UP; + using SearchIterator = search::queryeval::SearchIterator; + using UP = std::unique_ptr<MaybeMatchPhaseLimiter>; virtual bool is_enabled() const = 0; virtual bool was_limited() const = 0; virtual size_t sample_hits_per_thread(size_t num_threads) const = 0; diff --git a/searchcore/src/vespa/searchcore/proton/matching/match_tools.h b/searchcore/src/vespa/searchcore/proton/matching/match_tools.h index bc147e9c787..fda0c86b24e 100644 --- a/searchcore/src/vespa/searchcore/proton/matching/match_tools.h +++ b/searchcore/src/vespa/searchcore/proton/matching/match_tools.h @@ -55,7 +55,7 @@ private: bool _search_has_changed; void setup(std::unique_ptr<RankProgram>, ExecutionProfiler *profiler, double termwise_limit = 1.0); public: - typedef std::unique_ptr<MatchTools> UP; + using UP = std::unique_ptr<MatchTools>; MatchTools(const MatchTools &) = delete; MatchTools & operator = (const MatchTools &) = delete; MatchTools(QueryLimiter & queryLimiter, diff --git a/searchcore/src/vespa/searchcore/proton/matching/querylimiter.h b/searchcore/src/vespa/searchcore/proton/matching/querylimiter.h index c3e6e9af475..897fdd6b4a0 100644 --- a/searchcore/src/vespa/searchcore/proton/matching/querylimiter.h +++ b/searchcore/src/vespa/searchcore/proton/matching/querylimiter.h @@ -12,11 +12,11 @@ namespace proton::matching { class QueryLimiter { private: - typedef vespalib::Doom Doom; + using Doom = vespalib::Doom; public: class Token { public: - typedef std::unique_ptr<Token> UP; + using UP = std::unique_ptr<Token>; virtual ~Token() = default; }; public: diff --git a/searchcore/src/vespa/searchcore/proton/matching/result_processor.h b/searchcore/src/vespa/searchcore/proton/matching/result_processor.h index 5ec11cd7acb..4a59609da5c 100644 --- a/searchcore/src/vespa/searchcore/proton/matching/result_processor.h +++ b/searchcore/src/vespa/searchcore/proton/matching/result_processor.h @@ -33,7 +33,7 @@ public: * multi-level sorting. **/ struct Sort { - typedef std::unique_ptr<Sort> UP; + using UP = std::unique_ptr<Sort>; FastS_IResultSorter *sorter; std::unique_ptr<search::common::ConverterFactory> _ucaFactory; FastS_SortSpec sortSpec; diff --git a/searchcore/src/vespa/searchcore/proton/matching/search_session.h b/searchcore/src/vespa/searchcore/proton/matching/search_session.h index 2e0ded7ba01..4fc71b30f0a 100644 --- a/searchcore/src/vespa/searchcore/proton/matching/search_session.h +++ b/searchcore/src/vespa/searchcore/proton/matching/search_session.h @@ -32,7 +32,7 @@ public: IDocumentMetaStoreContext::IReadGuard::UP readGuard; }; private: - typedef vespalib::string SessionId; + using SessionId = vespalib::string; SessionId _session_id; vespalib::steady_time _create_time; @@ -41,7 +41,7 @@ private: std::unique_ptr<MatchToolsFactory> _match_tools_factory; public: - typedef std::shared_ptr<SearchSession> SP; + using SP = std::shared_ptr<SearchSession>; SearchSession(const SessionId &id, vespalib::steady_time create_time, vespalib::steady_time time_of_doom, std::unique_ptr<MatchToolsFactory> match_tools_factory, diff --git a/searchcore/src/vespa/searchcore/proton/matching/sessionmanager.cpp b/searchcore/src/vespa/searchcore/proton/matching/sessionmanager.cpp index 0eaf7eb9e39..d4ad82adbb1 100644 --- a/searchcore/src/vespa/searchcore/proton/matching/sessionmanager.cpp +++ b/searchcore/src/vespa/searchcore/proton/matching/sessionmanager.cpp @@ -26,7 +26,7 @@ protected: template <typename T> struct SessionCache : SessionCacheBase { - typedef typename T::UP EntryUP; + using EntryUP = typename T::UP; vespalib::lrucache_map<vespalib::LruParam<SessionId, EntryUP> > _cache; SessionCache(uint32_t max_size) : _cache(max_size) {} @@ -85,7 +85,7 @@ struct SessionCache : SessionCacheBase { template <typename T> struct SessionMap : SessionCacheBase { - typedef typename T::SP EntrySP; + using EntrySP = typename T::SP; vespalib::hash_map<SessionId, EntrySP> _map; void insert(EntrySP session) { diff --git a/searchcore/src/vespa/searchcore/proton/matching/sessionmanager.h b/searchcore/src/vespa/searchcore/proton/matching/sessionmanager.h index 2a3b263ce98..b193e61ff7d 100644 --- a/searchcore/src/vespa/searchcore/proton/matching/sessionmanager.h +++ b/searchcore/src/vespa/searchcore/proton/matching/sessionmanager.h @@ -45,8 +45,8 @@ private: std::unique_ptr<SearchSessionCache> _search_map; public: - typedef std::unique_ptr<SessionManager> UP; - typedef std::shared_ptr<SessionManager> SP; + using UP = std::unique_ptr<SessionManager>; + using SP = std::shared_ptr<SessionManager>; SessionManager(uint32_t maxSizeGrouping); ~SessionManager(); diff --git a/searchcore/src/vespa/searchcore/proton/matching/viewresolver.h b/searchcore/src/vespa/searchcore/proton/matching/viewresolver.h index 00d4a7b4f33..6ad550833ce 100644 --- a/searchcore/src/vespa/searchcore/proton/matching/viewresolver.h +++ b/searchcore/src/vespa/searchcore/proton/matching/viewresolver.h @@ -20,7 +20,7 @@ namespace proton::matching { class ViewResolver { private: - typedef std::map<vespalib::string, std::vector<vespalib::string> > Map; + using Map = std::map<vespalib::string, std::vector<vespalib::string> >; Map _map; public: diff --git a/searchcore/src/vespa/searchcore/proton/metrics/documentdb_job_trackers.cpp b/searchcore/src/vespa/searchcore/proton/metrics/documentdb_job_trackers.cpp index 2e56b7010f9..f7605e8b1c6 100644 --- a/searchcore/src/vespa/searchcore/proton/metrics/documentdb_job_trackers.cpp +++ b/searchcore/src/vespa/searchcore/proton/metrics/documentdb_job_trackers.cpp @@ -7,8 +7,8 @@ LOG_SETUP(".proton.metrics.documentdb_job_trackers"); using searchcorespi::IFlushTarget; -typedef IFlushTarget::Type FTT; -typedef IFlushTarget::Component FTC; +using FTT = IFlushTarget::Type; +using FTC = IFlushTarget::Component; using time_point = std::chrono::time_point<std::chrono::steady_clock>; diff --git a/searchcore/src/vespa/searchcore/proton/metrics/metrics_engine.h b/searchcore/src/vespa/searchcore/proton/metrics/metrics_engine.h index 06d76d1d8d7..399868c4afe 100644 --- a/searchcore/src/vespa/searchcore/proton/metrics/metrics_engine.h +++ b/searchcore/src/vespa/searchcore/proton/metrics/metrics_engine.h @@ -29,7 +29,7 @@ private: metrics::StateApiAdapter _metrics_producer; public: - typedef std::unique_ptr<MetricsEngine> UP; + using UP = std::unique_ptr<MetricsEngine>; MetricsEngine(); ~MetricsEngine() override; diff --git a/searchcore/src/vespa/searchcore/proton/metrics/trans_log_server_metrics.h b/searchcore/src/vespa/searchcore/proton/metrics/trans_log_server_metrics.h index 0b99a54d646..ba3c6fb0db7 100644 --- a/searchcore/src/vespa/searchcore/proton/metrics/trans_log_server_metrics.h +++ b/searchcore/src/vespa/searchcore/proton/metrics/trans_log_server_metrics.h @@ -20,7 +20,7 @@ public: metrics::LongValueMetric diskUsage; metrics::DoubleValueMetric replayTime; - typedef std::unique_ptr<DomainMetrics> UP; + using UP = std::unique_ptr<DomainMetrics>; DomainMetrics(metrics::MetricSet *parent, const vespalib::string &documentType); ~DomainMetrics() override; void update(const search::transactionlog::DomainInfo &stats); diff --git a/searchcore/src/vespa/searchcore/proton/persistenceengine/document_iterator.cpp b/searchcore/src/vespa/searchcore/proton/persistenceengine/document_iterator.cpp index de45770ce3c..b7da67d42b6 100644 --- a/searchcore/src/vespa/searchcore/proton/persistenceengine/document_iterator.cpp +++ b/searchcore/src/vespa/searchcore/proton/persistenceengine/document_iterator.cpp @@ -190,7 +190,7 @@ private: std::unique_ptr<SelectContext> _selectCxt; }; -typedef vespalib::hash_map<uint32_t, uint32_t> LidIndexMap; +using LidIndexMap = vespalib::hash_map<uint32_t, uint32_t>; class MatchVisitor : public search::IDocumentVisitor { diff --git a/searchcore/src/vespa/searchcore/proton/persistenceengine/persistenceengine.cpp b/searchcore/src/vespa/searchcore/proton/persistenceengine/persistenceengine.cpp index df3dcdcf66a..1f1550e0f2c 100644 --- a/searchcore/src/vespa/searchcore/proton/persistenceengine/persistenceengine.cpp +++ b/searchcore/src/vespa/searchcore/proton/persistenceengine/persistenceengine.cpp @@ -634,7 +634,7 @@ BucketIdListResult PersistenceEngine::getModifiedBuckets(BucketSpace bucketSpace) const { ReadGuard rguard(_rwMutex); - typedef BucketIdListResultV MBV; + using MBV = BucketIdListResultV; MBV extraModifiedBuckets; { std::lock_guard<std::mutex> guard(_lock); @@ -797,7 +797,7 @@ PersistenceEngine::populateInitialBucketDB(const WriteGuard & guard, BucketSpace IPersistenceHandler *handler = snap.handlers().get(); handler->handleListActiveBuckets(resultHandler); } - typedef std::map<document::BucketId, size_t> BucketIdMap; + using BucketIdMap = std::map<document::BucketId, size_t>; document::BucketId::List buckets; const BucketIdMap &bucketMap(resultHandler.getBucketMap()); diff --git a/searchcore/src/vespa/searchcore/proton/persistenceengine/persistenceengine.h b/searchcore/src/vespa/searchcore/proton/persistenceengine/persistenceengine.h index 2581d35064e..a3182c76166 100644 --- a/searchcore/src/vespa/searchcore/proton/persistenceengine/persistenceengine.h +++ b/searchcore/src/vespa/searchcore/proton/persistenceengine/persistenceengine.h @@ -58,8 +58,8 @@ private: std::size_t operator() (const document::BucketSpace &bucketSpace) const { return bucketSpace.getId(); } }; - typedef std::map<IteratorId, IteratorEntry *> Iterators; - typedef std::vector<std::shared_ptr<BucketIdListResult> > BucketIdListResultV; + using Iterators = std::map<IteratorId, IteratorEntry *>; + using BucketIdListResultV = std::vector<std::shared_ptr<BucketIdListResult> >; using ExtraModifiedBuckets = std::unordered_map<BucketSpace, BucketIdListResultV, BucketSpaceHash>; @@ -92,7 +92,7 @@ private: void removeAsyncSingle(const Bucket&, Timestamp, const document::DocumentId &id, OperationComplete::UP); void removeAsyncMulti(const Bucket&, std::vector<storage::spi::IdAndTimestamp> ids, OperationComplete::UP); public: - typedef std::unique_ptr<PersistenceEngine> UP; + using UP = std::unique_ptr<PersistenceEngine>; PersistenceEngine(IPersistenceEngineOwner &owner, const IResourceWriteFilter &writeFilter, IDiskMemUsageNotifier &disk_mem_usage_notifier, ssize_t defaultSerializedSize, bool ignoreMaxBytes); diff --git a/searchcore/src/vespa/searchcore/proton/reprocessing/attribute_reprocessing_initializer.cpp b/searchcore/src/vespa/searchcore/proton/reprocessing/attribute_reprocessing_initializer.cpp index 294294194f4..90f287af821 100644 --- a/searchcore/src/vespa/searchcore/proton/reprocessing/attribute_reprocessing_initializer.cpp +++ b/searchcore/src/vespa/searchcore/proton/reprocessing/attribute_reprocessing_initializer.cpp @@ -22,7 +22,7 @@ using search::index::schema::DataType; namespace proton { -typedef AttributeReprocessingInitializer::Config ARIConfig; +using ARIConfig = AttributeReprocessingInitializer::Config; namespace { diff --git a/searchcore/src/vespa/searchcore/proton/reprocessing/attribute_reprocessing_initializer.h b/searchcore/src/vespa/searchcore/proton/reprocessing/attribute_reprocessing_initializer.h index d6f166d74d8..8de239975ce 100644 --- a/searchcore/src/vespa/searchcore/proton/reprocessing/attribute_reprocessing_initializer.h +++ b/searchcore/src/vespa/searchcore/proton/reprocessing/attribute_reprocessing_initializer.h @@ -25,7 +25,7 @@ class IIndexschemaInspector; class AttributeReprocessingInitializer : public IReprocessingInitializer { public: - typedef std::unique_ptr<AttributeReprocessingInitializer> UP; + using UP = std::unique_ptr<AttributeReprocessingInitializer>; class Config { diff --git a/searchcore/src/vespa/searchcore/proton/reprocessing/document_reprocessing_handler.h b/searchcore/src/vespa/searchcore/proton/reprocessing/document_reprocessing_handler.h index 74e5ea1254c..10ceef96236 100644 --- a/searchcore/src/vespa/searchcore/proton/reprocessing/document_reprocessing_handler.h +++ b/searchcore/src/vespa/searchcore/proton/reprocessing/document_reprocessing_handler.h @@ -15,8 +15,8 @@ class DocumentReprocessingHandler : public IReprocessingHandler, public search::IDocumentStoreReadVisitor { private: - typedef std::vector<IReprocessingReader::SP> ReaderVector; - typedef std::vector<IReprocessingRewriter::SP> RewriterVector; + using ReaderVector = std::vector<IReprocessingReader::SP>; + using RewriterVector = std::vector<IReprocessingRewriter::SP>; class RewriteVisitor : public search::IDocumentStoreRewriteVisitor { diff --git a/searchcore/src/vespa/searchcore/proton/reprocessing/i_reprocessing_initializer.h b/searchcore/src/vespa/searchcore/proton/reprocessing/i_reprocessing_initializer.h index dd17606bbca..171167cae6b 100644 --- a/searchcore/src/vespa/searchcore/proton/reprocessing/i_reprocessing_initializer.h +++ b/searchcore/src/vespa/searchcore/proton/reprocessing/i_reprocessing_initializer.h @@ -11,7 +11,7 @@ namespace proton { */ struct IReprocessingInitializer { - typedef std::unique_ptr<IReprocessingInitializer> UP; + using UP = std::unique_ptr<IReprocessingInitializer>; virtual ~IReprocessingInitializer() {} diff --git a/searchcore/src/vespa/searchcore/proton/reprocessing/i_reprocessing_reader.h b/searchcore/src/vespa/searchcore/proton/reprocessing/i_reprocessing_reader.h index 77bcab51fa9..6619fd28be2 100644 --- a/searchcore/src/vespa/searchcore/proton/reprocessing/i_reprocessing_reader.h +++ b/searchcore/src/vespa/searchcore/proton/reprocessing/i_reprocessing_reader.h @@ -12,7 +12,7 @@ namespace proton { */ struct IReprocessingReader { - typedef std::shared_ptr<IReprocessingReader> SP; + using SP = std::shared_ptr<IReprocessingReader>; virtual ~IReprocessingReader() = default; diff --git a/searchcore/src/vespa/searchcore/proton/reprocessing/i_reprocessing_rewriter.h b/searchcore/src/vespa/searchcore/proton/reprocessing/i_reprocessing_rewriter.h index ef31497d237..d95b3401337 100644 --- a/searchcore/src/vespa/searchcore/proton/reprocessing/i_reprocessing_rewriter.h +++ b/searchcore/src/vespa/searchcore/proton/reprocessing/i_reprocessing_rewriter.h @@ -12,7 +12,7 @@ namespace proton { */ struct IReprocessingRewriter { - typedef std::shared_ptr<IReprocessingRewriter> SP; + using SP = std::shared_ptr<IReprocessingRewriter>; virtual ~IReprocessingRewriter() {} diff --git a/searchcore/src/vespa/searchcore/proton/reprocessing/i_reprocessing_task.h b/searchcore/src/vespa/searchcore/proton/reprocessing/i_reprocessing_task.h index 52c9ba293d3..1bafa7a94fb 100644 --- a/searchcore/src/vespa/searchcore/proton/reprocessing/i_reprocessing_task.h +++ b/searchcore/src/vespa/searchcore/proton/reprocessing/i_reprocessing_task.h @@ -14,9 +14,9 @@ namespace proton { class IReprocessingTask { public: - typedef std::shared_ptr<IReprocessingTask> SP; - typedef std::unique_ptr<IReprocessingTask> UP; - typedef std::vector<SP> List; + using SP = std::shared_ptr<IReprocessingTask>; + using UP = std::unique_ptr<IReprocessingTask>; + using List = std::vector<SP>; struct Progress { diff --git a/searchcore/src/vespa/searchcore/proton/reprocessing/reprocessingrunner.h b/searchcore/src/vespa/searchcore/proton/reprocessing/reprocessingrunner.h index f451dff89f2..9bddc5b46eb 100644 --- a/searchcore/src/vespa/searchcore/proton/reprocessing/reprocessingrunner.h +++ b/searchcore/src/vespa/searchcore/proton/reprocessing/reprocessingrunner.h @@ -16,7 +16,7 @@ class IReprocessingTask; class ReprocessingRunner { public: - typedef std::vector<std::shared_ptr<IReprocessingTask>> ReprocessingTasks; + using ReprocessingTasks = std::vector<std::shared_ptr<IReprocessingTask>>; private: mutable std::mutex _lock; ReprocessingTasks _tasks; // Protected by _lock diff --git a/searchcore/src/vespa/searchcore/proton/server/bootstrapconfig.h b/searchcore/src/vespa/searchcore/proton/server/bootstrapconfig.h index e69b015e782..e697ad58a81 100644 --- a/searchcore/src/vespa/searchcore/proton/server/bootstrapconfig.h +++ b/searchcore/src/vespa/searchcore/proton/server/bootstrapconfig.h @@ -22,8 +22,8 @@ namespace proton { class BootstrapConfig { public: - typedef std::shared_ptr<BootstrapConfig> SP; - typedef std::shared_ptr<vespa::config::search::core::ProtonConfig> ProtonConfigSP; + using SP = std::shared_ptr<BootstrapConfig>; + using ProtonConfigSP = std::shared_ptr<vespa::config::search::core::ProtonConfig>; using FiledistributorrpcConfig = const cloud::config::filedistribution::FiledistributorrpcConfig; using FiledistributorrpcConfigSP = std::shared_ptr<FiledistributorrpcConfig>; diff --git a/searchcore/src/vespa/searchcore/proton/server/bootstrapconfigmanager.cpp b/searchcore/src/vespa/searchcore/proton/server/bootstrapconfigmanager.cpp index c89422e38b1..390d7eb018e 100644 --- a/searchcore/src/vespa/searchcore/proton/server/bootstrapconfigmanager.cpp +++ b/searchcore/src/vespa/searchcore/proton/server/bootstrapconfigmanager.cpp @@ -54,8 +54,8 @@ BootstrapConfigManager::getConfig() const void BootstrapConfigManager::update(const ConfigSnapshot & snapshot) { - typedef BootstrapConfig::ProtonConfigSP ProtonConfigSP; - typedef BootstrapConfig::DocumenttypesConfigSP DocumenttypesConfigSP; + using ProtonConfigSP = BootstrapConfig::ProtonConfigSP; + using DocumenttypesConfigSP = BootstrapConfig::DocumenttypesConfigSP; ProtonConfigSP newProtonConfig; BootstrapConfig::FiledistributorrpcConfigSP newFiledistRpcConfSP; diff --git a/searchcore/src/vespa/searchcore/proton/server/combiningfeedview.h b/searchcore/src/vespa/searchcore/proton/server/combiningfeedview.h index ff640a32887..0cc5b2454a6 100644 --- a/searchcore/src/vespa/searchcore/proton/server/combiningfeedview.h +++ b/searchcore/src/vespa/searchcore/proton/server/combiningfeedview.h @@ -51,7 +51,7 @@ private: vespalib::Trinary shouldBeReady(const document::BucketId &bucket) const; void forceCommit(const CommitParam & param, DoneCallback onDone) override; public: - typedef std::shared_ptr<CombiningFeedView> SP; + using SP = std::shared_ptr<CombiningFeedView>; CombiningFeedView(const std::vector<IFeedView::SP> &views, document::BucketSpace bucketSpace, diff --git a/searchcore/src/vespa/searchcore/proton/server/configstore.h b/searchcore/src/vespa/searchcore/proton/server/configstore.h index b6923e45e2a..0eb6fe262cf 100644 --- a/searchcore/src/vespa/searchcore/proton/server/configstore.h +++ b/searchcore/src/vespa/searchcore/proton/server/configstore.h @@ -13,8 +13,8 @@ namespace proton { class DocumentDBConfig; struct ConfigStore : FeedConfigStore { - typedef std::unique_ptr<ConfigStore> UP; - typedef search::SerialNum SerialNum; + using UP = std::unique_ptr<ConfigStore>; + using SerialNum = search::SerialNum; using ProtonConfig = const vespa::config::search::core::internal::InternalProtonType; using ProtonConfigSP = std::shared_ptr<ProtonConfig>; diff --git a/searchcore/src/vespa/searchcore/proton/server/document_db_maintenance_config.h b/searchcore/src/vespa/searchcore/proton/server/document_db_maintenance_config.h index 2891f769a96..eb84b52486d 100644 --- a/searchcore/src/vespa/searchcore/proton/server/document_db_maintenance_config.h +++ b/searchcore/src/vespa/searchcore/proton/server/document_db_maintenance_config.h @@ -99,7 +99,7 @@ private: class DocumentDBMaintenanceConfig { public: - typedef std::shared_ptr<DocumentDBMaintenanceConfig> SP; + using SP = std::shared_ptr<DocumentDBMaintenanceConfig>; private: DocumentDBPruneConfig _pruneRemovedDocuments; diff --git a/searchcore/src/vespa/searchcore/proton/server/document_scan_iterator.cpp b/searchcore/src/vespa/searchcore/proton/server/document_scan_iterator.cpp index c0f27e729af..35c4e34a154 100644 --- a/searchcore/src/vespa/searchcore/proton/server/document_scan_iterator.cpp +++ b/searchcore/src/vespa/searchcore/proton/server/document_scan_iterator.cpp @@ -7,7 +7,7 @@ using search::DocumentMetaData; namespace proton { -typedef IDocumentMetaStore::Iterator Iterator; +using Iterator = IDocumentMetaStore::Iterator; DocumentScanIterator::DocumentScanIterator(const IDocumentMetaStore &metaStore) : _metaStore(metaStore), diff --git a/searchcore/src/vespa/searchcore/proton/server/documentbucketmover.cpp b/searchcore/src/vespa/searchcore/proton/server/documentbucketmover.cpp index 7a1826fe8ff..7c1675aa4eb 100644 --- a/searchcore/src/vespa/searchcore/proton/server/documentbucketmover.cpp +++ b/searchcore/src/vespa/searchcore/proton/server/documentbucketmover.cpp @@ -16,7 +16,7 @@ using storage::spi::Timestamp; namespace proton::bucketdb { -typedef IDocumentMetaStore::Iterator Iterator; +using Iterator = IDocumentMetaStore::Iterator; MoveOperation::UP BucketMover::createMoveOperation(const MoveKey &key) { diff --git a/searchcore/src/vespa/searchcore/proton/server/documentdb_metrics_updater.cpp b/searchcore/src/vespa/searchcore/proton/server/documentdb_metrics_updater.cpp index 8844c2b5fda..2890db710d4 100644 --- a/searchcore/src/vespa/searchcore/proton/server/documentdb_metrics_updater.cpp +++ b/searchcore/src/vespa/searchcore/proton/server/documentdb_metrics_updater.cpp @@ -90,7 +90,7 @@ struct TempAttributeMetric struct TempAttributeMetrics { - typedef std::map<vespalib::string, TempAttributeMetric> AttrMap; + using AttrMap = std::map<vespalib::string, TempAttributeMetric>; TempAttributeMetric total; AttrMap attrs; }; diff --git a/searchcore/src/vespa/searchcore/proton/server/documentdbconfigmanager.cpp b/searchcore/src/vespa/searchcore/proton/server/documentdbconfigmanager.cpp index 18237b67a35..f32b03beb78 100644 --- a/searchcore/src/vespa/searchcore/proton/server/documentdbconfigmanager.cpp +++ b/searchcore/src/vespa/searchcore/proton/server/documentdbconfigmanager.cpp @@ -100,7 +100,7 @@ DocumentDBMaintenanceConfig::SP buildMaintenanceConfig(const BootstrapConfig::SP &bootstrapConfig, const vespalib::string &docTypeName) { - typedef ProtonConfig::Documentdb DdbConfig; + using DdbConfig = ProtonConfig::Documentdb; ProtonConfig &proton(bootstrapConfig->getProtonConfig()); vespalib::duration visibilityDelay = vespalib::duration::zero(); diff --git a/searchcore/src/vespa/searchcore/proton/server/documentretriever.h b/searchcore/src/vespa/searchcore/proton/server/documentretriever.h index ac9f6c584aa..654f694fb79 100644 --- a/searchcore/src/vespa/searchcore/proton/server/documentretriever.h +++ b/searchcore/src/vespa/searchcore/proton/server/documentretriever.h @@ -34,7 +34,7 @@ private: class DocumentRetriever : public DocumentRetrieverBase, public IFieldInfo { public: - typedef std::vector<std::pair<const document::Field *, vespalib::string>> PositionFields; + using PositionFields = std::vector<std::pair<const document::Field *, vespalib::string>>; DocumentRetriever(const DocTypeName &docTypeName, const document::DocumentTypeRepo &repo, const search::index::Schema &schema, diff --git a/searchcore/src/vespa/searchcore/proton/server/emptysearchview.h b/searchcore/src/vespa/searchcore/proton/server/emptysearchview.h index 6db313ca3f1..9c099b12425 100644 --- a/searchcore/src/vespa/searchcore/proton/server/emptysearchview.h +++ b/searchcore/src/vespa/searchcore/proton/server/emptysearchview.h @@ -9,7 +9,7 @@ namespace proton { class EmptySearchView : public ISearchHandler { public: - typedef std::shared_ptr<EmptySearchView> SP; + using SP = std::shared_ptr<EmptySearchView>; EmptySearchView(); diff --git a/searchcore/src/vespa/searchcore/proton/server/fast_access_feed_view.h b/searchcore/src/vespa/searchcore/proton/server/fast_access_feed_view.h index efe47401855..bc2e4dd9d05 100644 --- a/searchcore/src/vespa/searchcore/proton/server/fast_access_feed_view.h +++ b/searchcore/src/vespa/searchcore/proton/server/fast_access_feed_view.h @@ -17,8 +17,8 @@ namespace proton { class FastAccessFeedView : public StoreOnlyFeedView { public: - typedef std::shared_ptr<FastAccessFeedView> SP; - typedef std::unique_ptr<FastAccessFeedView> UP; + using SP = std::shared_ptr<FastAccessFeedView>; + using UP = std::unique_ptr<FastAccessFeedView>; struct Context { @@ -31,7 +31,7 @@ public: }; private: - typedef StoreOnlyFeedView Parent; + using Parent = StoreOnlyFeedView; const IAttributeWriter::SP _attributeWriter; DocIdLimit &_docIdLimit; diff --git a/searchcore/src/vespa/searchcore/proton/server/fileconfigmanager.cpp b/searchcore/src/vespa/searchcore/proton/server/fileconfigmanager.cpp index 88d0d9188ac..f22f57979b4 100644 --- a/searchcore/src/vespa/searchcore/proton/server/fileconfigmanager.cpp +++ b/searchcore/src/vespa/searchcore/proton/server/fileconfigmanager.cpp @@ -92,7 +92,7 @@ save(const vespalib::string &snapDir, const Config &config) class ConfigFile { - typedef std::shared_ptr<ConfigFile> SP; + using SP = std::shared_ptr<ConfigFile>; vespalib::string _name; time_t _modTime; @@ -362,7 +362,7 @@ FileConfigManager::loadConfig(const DocumentDBConfig ¤tSnapshot, search::S void FileConfigManager::removeInvalid() { - typedef std::vector<SerialNum> RemVec; + using RemVec = std::vector<SerialNum>; RemVec toRem; const SnapshotList &snaps = _info.snapshots(); @@ -394,7 +394,7 @@ FileConfigManager::removeInvalid() void FileConfigManager::prune(SerialNum serialNum) { - typedef std::vector<SerialNum> PruneVec; + using PruneVec = std::vector<SerialNum>; PruneVec toPrune; const SnapshotList &snaps = _info.snapshots(); diff --git a/searchcore/src/vespa/searchcore/proton/server/i_document_scan_iterator.h b/searchcore/src/vespa/searchcore/proton/server/i_document_scan_iterator.h index b3c14173b0e..b50558f0bad 100644 --- a/searchcore/src/vespa/searchcore/proton/server/i_document_scan_iterator.h +++ b/searchcore/src/vespa/searchcore/proton/server/i_document_scan_iterator.h @@ -12,7 +12,7 @@ namespace proton { */ struct IDocumentScanIterator { - typedef std::unique_ptr<IDocumentScanIterator> UP; + using UP = std::unique_ptr<IDocumentScanIterator>; virtual ~IDocumentScanIterator() = default; diff --git a/searchcore/src/vespa/searchcore/proton/server/i_lid_space_compaction_handler.h b/searchcore/src/vespa/searchcore/proton/server/i_lid_space_compaction_handler.h index 8ab2738cc5e..d82de57c5f0 100644 --- a/searchcore/src/vespa/searchcore/proton/server/i_lid_space_compaction_handler.h +++ b/searchcore/src/vespa/searchcore/proton/server/i_lid_space_compaction_handler.h @@ -24,7 +24,7 @@ struct IDocumentScanIterator; */ struct ILidSpaceCompactionHandler { - typedef std::shared_ptr<ILidSpaceCompactionHandler> SP; + using SP = std::shared_ptr<ILidSpaceCompactionHandler>; using Vector = std::vector<SP>; virtual ~ILidSpaceCompactionHandler() = default; diff --git a/searchcore/src/vespa/searchcore/proton/server/maintenancejobrunner.h b/searchcore/src/vespa/searchcore/proton/server/maintenancejobrunner.h index 200f0d05de0..05a76bfebba 100644 --- a/searchcore/src/vespa/searchcore/proton/server/maintenancejobrunner.h +++ b/searchcore/src/vespa/searchcore/proton/server/maintenancejobrunner.h @@ -26,7 +26,7 @@ private: void runJobInExecutor(); public: - typedef std::shared_ptr<MaintenanceJobRunner> SP; + using SP = std::shared_ptr<MaintenanceJobRunner>; MaintenanceJobRunner(vespalib::Executor &executor, IMaintenanceJob::UP job); void run() override; diff --git a/searchcore/src/vespa/searchcore/proton/server/matchview.h b/searchcore/src/vespa/searchcore/proton/server/matchview.h index 603d929b407..2a4347377df 100644 --- a/searchcore/src/vespa/searchcore/proton/server/matchview.h +++ b/searchcore/src/vespa/searchcore/proton/server/matchview.h @@ -31,7 +31,7 @@ class MatchView { } public: - typedef std::shared_ptr<MatchView> SP; + using SP = std::shared_ptr<MatchView>; MatchView(const MatchView &) = delete; MatchView & operator = (const MatchView &) = delete; diff --git a/searchcore/src/vespa/searchcore/proton/server/memoryconfigstore.h b/searchcore/src/vespa/searchcore/proton/server/memoryconfigstore.h index e42328d9fd1..90810c5bcfb 100644 --- a/searchcore/src/vespa/searchcore/proton/server/memoryconfigstore.h +++ b/searchcore/src/vespa/searchcore/proton/server/memoryconfigstore.h @@ -10,7 +10,7 @@ namespace proton { struct ConfigMaps { - typedef std::shared_ptr<ConfigMaps> SP; + using SP = std::shared_ptr<ConfigMaps>; std::map<search::SerialNum, std::shared_ptr<DocumentDBConfig>> configs; std::set<search::SerialNum> _valid; ~ConfigMaps(); diff --git a/searchcore/src/vespa/searchcore/proton/server/packetwrapper.h b/searchcore/src/vespa/searchcore/proton/server/packetwrapper.h index 4738936c159..c764dc08608 100644 --- a/searchcore/src/vespa/searchcore/proton/server/packetwrapper.h +++ b/searchcore/src/vespa/searchcore/proton/server/packetwrapper.h @@ -13,7 +13,7 @@ namespace proton { * executor thread. */ struct PacketWrapper { - typedef std::shared_ptr<PacketWrapper> SP; + using SP = std::shared_ptr<PacketWrapper>; const search::transactionlog::Packet &packet; TlsReplayProgress *progress; diff --git a/searchcore/src/vespa/searchcore/proton/server/proton.cpp b/searchcore/src/vespa/searchcore/proton/server/proton.cpp index a562e414128..b9531786f10 100644 --- a/searchcore/src/vespa/searchcore/proton/server/proton.cpp +++ b/searchcore/src/vespa/searchcore/proton/server/proton.cpp @@ -179,7 +179,7 @@ void Proton::ProtonFileHeaderContext::addTags(vespalib::GenericHeader &header, const vespalib::string &name) const { - typedef vespalib::GenericHeader::Tag Tag; + using Tag = vespalib::GenericHeader::Tag; search::FileHeaderTk::addVersionTags(header); header.putTag(Tag("fileName", name)); @@ -952,7 +952,7 @@ struct StateExplorerProxy : vespalib::StateExplorer { }; struct DocumentDBMapExplorer : vespalib::StateExplorer { - typedef std::map<DocTypeName, DocumentDB::SP> DocumentDBMap; + using DocumentDBMap = std::map<DocTypeName, DocumentDB::SP>; const DocumentDBMap &documentDBMap; std::shared_mutex &mutex; DocumentDBMapExplorer(const DocumentDBMap &documentDBMap_in, std::shared_mutex &mutex_in) diff --git a/searchcore/src/vespa/searchcore/proton/server/proton.h b/searchcore/src/vespa/searchcore/proton/server/proton.h index b07ebece0c7..108adca9d83 100644 --- a/searchcore/src/vespa/searchcore/proton/server/proton.h +++ b/searchcore/src/vespa/searchcore/proton/server/proton.h @@ -152,8 +152,8 @@ private: bool updateNodeUp(BucketSpace bucketSpace, bool nodeUpInBucketSpace); void closeDocumentDBs(vespalib::ThreadStackExecutorBase & executor); public: - typedef std::unique_ptr<Proton> UP; - typedef std::shared_ptr<Proton> SP; + using UP = std::unique_ptr<Proton>; + using SP = std::shared_ptr<Proton>; Proton(FastOS_ThreadPool & threadPool, FNET_Transport & transport, const config::ConfigUri & configUri, const vespalib::string &progName, vespalib::duration subscribeTimeout); diff --git a/searchcore/src/vespa/searchcore/proton/server/proton_config_fetcher.h b/searchcore/src/vespa/searchcore/proton/server/proton_config_fetcher.h index a0c7c276e62..b0046e17a63 100644 --- a/searchcore/src/vespa/searchcore/proton/server/proton_config_fetcher.h +++ b/searchcore/src/vespa/searchcore/proton/server/proton_config_fetcher.h @@ -49,7 +49,7 @@ public: void Run(FastOS_ThreadInterface * thread, void *arg) override; private: - typedef std::map<DocTypeName, std::shared_ptr<DocumentDBConfigManager>> DBManagerMap; + using DBManagerMap = std::map<DocTypeName, std::shared_ptr<DocumentDBConfigManager>>; using OldDocumentTypeRepo = std::pair<vespalib::steady_time, std::shared_ptr<const document::DocumentTypeRepo>>; using lock_guard = std::lock_guard<std::mutex>; diff --git a/searchcore/src/vespa/searchcore/proton/server/replaypacketdispatcher.h b/searchcore/src/vespa/searchcore/proton/server/replaypacketdispatcher.h index 7fb1b8880f4..882a3b16605 100644 --- a/searchcore/src/vespa/searchcore/proton/server/replaypacketdispatcher.h +++ b/searchcore/src/vespa/searchcore/proton/server/replaypacketdispatcher.h @@ -16,7 +16,7 @@ class FeedOperation; class ReplayPacketDispatcher { private: - typedef search::transactionlog::Packet Packet; + using Packet = search::transactionlog::Packet; IReplayPacketHandler &_handler; template <typename OperationType> diff --git a/searchcore/src/vespa/searchcore/proton/server/rpc_hooks.h b/searchcore/src/vespa/searchcore/proton/server/rpc_hooks.h index 840ce4c2ec2..a323679a8d7 100644 --- a/searchcore/src/vespa/searchcore/proton/server/rpc_hooks.h +++ b/searchcore/src/vespa/searchcore/proton/server/rpc_hooks.h @@ -33,7 +33,7 @@ private: void getProtonStatus(FRT_RPCRequest * req); public: - typedef std::unique_ptr<RPCHooksBase> UP; + using UP = std::unique_ptr<RPCHooksBase>; struct Params { Proton &proton; config::ConfigUri slobrok_config; diff --git a/searchcore/src/vespa/searchcore/proton/server/searchable_doc_subdb_configurer.cpp b/searchcore/src/vespa/searchcore/proton/server/searchable_doc_subdb_configurer.cpp index f2ee50c335a..38487460b93 100644 --- a/searchcore/src/vespa/searchcore/proton/server/searchable_doc_subdb_configurer.cpp +++ b/searchcore/src/vespa/searchcore/proton/server/searchable_doc_subdb_configurer.cpp @@ -24,7 +24,7 @@ using matching::Matcher; using matching::RankingExpressions; using matching::OnnxModels; -typedef AttributeReprocessingInitializer::Config ARIConfig; +using ARIConfig = AttributeReprocessingInitializer::Config; void SearchableDocSubDBConfigurer::reconfigureFeedView(IAttributeWriter::SP attrWriter, diff --git a/searchcore/src/vespa/searchcore/proton/server/searchable_doc_subdb_configurer.h b/searchcore/src/vespa/searchcore/proton/server/searchable_doc_subdb_configurer.h index 6e5d6869a14..aef248d97eb 100644 --- a/searchcore/src/vespa/searchcore/proton/server/searchable_doc_subdb_configurer.h +++ b/searchcore/src/vespa/searchcore/proton/server/searchable_doc_subdb_configurer.h @@ -36,8 +36,8 @@ class ReconfigParams; class SearchableDocSubDBConfigurer { private: - typedef vespalib::VarHolder<SearchView::SP> SearchViewHolder; - typedef vespalib::VarHolder<SearchableFeedView::SP> FeedViewHolder; + using SearchViewHolder = vespalib::VarHolder<SearchView::SP>; + using FeedViewHolder = vespalib::VarHolder<SearchableFeedView::SP>; const ISummaryManager::SP &_summaryMgr; SearchViewHolder &_searchView; FeedViewHolder &_feedView; diff --git a/searchcore/src/vespa/searchcore/proton/server/searchable_feed_view.h b/searchcore/src/vespa/searchcore/proton/server/searchable_feed_view.h index 70b02c4a39f..e38fb340173 100644 --- a/searchcore/src/vespa/searchcore/proton/server/searchable_feed_view.h +++ b/searchcore/src/vespa/searchcore/proton/server/searchable_feed_view.h @@ -16,10 +16,10 @@ namespace proton { */ class SearchableFeedView : public FastAccessFeedView { - typedef FastAccessFeedView Parent; + using Parent = FastAccessFeedView; public: - typedef std::unique_ptr<SearchableFeedView> UP; - typedef std::shared_ptr<SearchableFeedView> SP; + using UP = std::unique_ptr<SearchableFeedView>; + using SP = std::shared_ptr<SearchableFeedView>; struct Context { const IIndexWriter::SP &_indexWriter; diff --git a/searchcore/src/vespa/searchcore/proton/server/searchabledocsubdb.h b/searchcore/src/vespa/searchcore/proton/server/searchabledocsubdb.h index dcfe0b32f4a..806d1191072 100644 --- a/searchcore/src/vespa/searchcore/proton/server/searchabledocsubdb.h +++ b/searchcore/src/vespa/searchcore/proton/server/searchabledocsubdb.h @@ -59,7 +59,7 @@ public: }; private: - typedef FastAccessDocSubDB Parent; + using Parent = FastAccessDocSubDB; using IFlushTargetList = std::vector<std::shared_ptr<searchcorespi::IFlushTarget>>; searchcorespi::IIndexManager::SP _indexMgr; diff --git a/searchcore/src/vespa/searchcore/proton/server/searchview.h b/searchcore/src/vespa/searchcore/proton/server/searchview.h index 8c9f6cffa94..f27052cace1 100644 --- a/searchcore/src/vespa/searchcore/proton/server/searchview.h +++ b/searchcore/src/vespa/searchcore/proton/server/searchview.h @@ -14,7 +14,7 @@ public: using SessionManager = matching::SessionManager; using IndexSearchable = searchcorespi::IndexSearchable; using InternalDocsumReply = std::pair<std::unique_ptr<DocsumReply>, bool>; - typedef std::shared_ptr<SearchView> SP; + using SP = std::shared_ptr<SearchView>; static std::shared_ptr<SearchView> create(ISummaryManager::ISummarySetup::SP summarySetup, MatchView::SP matchView); SearchView(const SearchView &) = delete; diff --git a/searchcore/src/vespa/searchcore/proton/server/storeonlydocsubdb.cpp b/searchcore/src/vespa/searchcore/proton/server/storeonlydocsubdb.cpp index 6647148657a..a5d679f87af 100644 --- a/searchcore/src/vespa/searchcore/proton/server/storeonlydocsubdb.cpp +++ b/searchcore/src/vespa/searchcore/proton/server/storeonlydocsubdb.cpp @@ -577,7 +577,7 @@ StoreOnlySubDBFileHeaderContext:: addTags(vespalib::GenericHeader &header, const vespalib::string &name) const { _parentFileHeaderContext.addTags(header, name); - typedef GenericHeader::Tag Tag; + using Tag = GenericHeader::Tag; header.putTag(Tag("documentType", _docTypeName.toString())); header.putTag(Tag("subDB", _subDB)); } diff --git a/searchcore/src/vespa/searchcore/proton/server/tls_replay_progress.h b/searchcore/src/vespa/searchcore/proton/server/tls_replay_progress.h index 921c47b2b60..cdcb5bb53c0 100644 --- a/searchcore/src/vespa/searchcore/proton/server/tls_replay_progress.h +++ b/searchcore/src/vespa/searchcore/proton/server/tls_replay_progress.h @@ -18,7 +18,7 @@ private: std::atomic<search::SerialNum> _current; public: - typedef std::unique_ptr<TlsReplayProgress> UP; + using UP = std::unique_ptr<TlsReplayProgress>; TlsReplayProgress(const vespalib::string &domainName, search::SerialNum first, diff --git a/searchcore/src/vespa/searchcore/proton/summaryengine/isearchhandler.h b/searchcore/src/vespa/searchcore/proton/summaryengine/isearchhandler.h index d4b4732397d..09aa28230d7 100644 --- a/searchcore/src/vespa/searchcore/proton/summaryengine/isearchhandler.h +++ b/searchcore/src/vespa/searchcore/proton/summaryengine/isearchhandler.h @@ -26,7 +26,7 @@ protected: using DocsumRequest = search::engine::DocsumRequest; using ThreadBundle = vespalib::ThreadBundle; public: - typedef std::shared_ptr<ISearchHandler> SP; + using SP = std::shared_ptr<ISearchHandler>; ISearchHandler(const ISearchHandler &) = delete; ISearchHandler & operator = (const ISearchHandler &) = delete; diff --git a/searchcore/src/vespa/searchcore/proton/test/bucketstatecalculator.h b/searchcore/src/vespa/searchcore/proton/test/bucketstatecalculator.h index c773ae32b3f..7d484dc4ef6 100644 --- a/searchcore/src/vespa/searchcore/proton/test/bucketstatecalculator.h +++ b/searchcore/src/vespa/searchcore/proton/test/bucketstatecalculator.h @@ -11,7 +11,7 @@ namespace proton::test { using BucketIdVector = document::bucket::BucketIdList; -typedef std::set<document::BucketId> BucketIdSet; +using BucketIdSet = std::set<document::BucketId>; class BucketStateCalculator : public IBucketStateCalculator { diff --git a/searchcore/src/vespa/searchcore/proton/test/document.h b/searchcore/src/vespa/searchcore/proton/test/document.h index bdabf2937ad..1ab91c86e25 100644 --- a/searchcore/src/vespa/searchcore/proton/test/document.h +++ b/searchcore/src/vespa/searchcore/proton/test/document.h @@ -41,7 +41,7 @@ public: uint32_t getDocSize() const { return 1000; } }; -typedef std::vector<Document> DocumentVector; +using DocumentVector = std::vector<Document>; struct DocumentGidOrderCmp { diff --git a/searchcore/src/vespa/searchcore/proton/test/document_meta_store_context_observer.h b/searchcore/src/vespa/searchcore/proton/test/document_meta_store_context_observer.h index 16b55567550..b763942216d 100644 --- a/searchcore/src/vespa/searchcore/proton/test/document_meta_store_context_observer.h +++ b/searchcore/src/vespa/searchcore/proton/test/document_meta_store_context_observer.h @@ -9,7 +9,7 @@ namespace proton::test { struct DocumentMetaStoreContextObserver : public IDocumentMetaStoreContext { - typedef std::shared_ptr<DocumentMetaStoreContextObserver> SP; + using SP = std::shared_ptr<DocumentMetaStoreContextObserver>; IDocumentMetaStoreContext &_context; DocumentMetaStoreObserver::SP _observer; diff --git a/searchcore/src/vespa/searchcore/proton/test/simple_job_tracker.h b/searchcore/src/vespa/searchcore/proton/test/simple_job_tracker.h index 6a472e5ad94..f90c4f6231f 100644 --- a/searchcore/src/vespa/searchcore/proton/test/simple_job_tracker.h +++ b/searchcore/src/vespa/searchcore/proton/test/simple_job_tracker.h @@ -8,7 +8,7 @@ namespace proton::test { struct SimpleJobTracker : public IJobTracker { - typedef std::shared_ptr<SimpleJobTracker> SP; + using SP = std::shared_ptr<SimpleJobTracker>; vespalib::CountDownLatch _started; vespalib::CountDownLatch _ended; SimpleJobTracker(uint32_t numJobTrackings) noexcept diff --git a/searchcore/src/vespa/searchcore/proton/test/userdocuments.h b/searchcore/src/vespa/searchcore/proton/test/userdocuments.h index ac3b97df9dd..60d9ed3d249 100644 --- a/searchcore/src/vespa/searchcore/proton/test/userdocuments.h +++ b/searchcore/src/vespa/searchcore/proton/test/userdocuments.h @@ -13,8 +13,8 @@ namespace proton::test { class UserDocuments { public: - typedef std::map<uint32_t, BucketDocuments> DocMap; - typedef DocMap::const_iterator Iterator; + using DocMap = std::map<uint32_t, BucketDocuments>; + using Iterator = DocMap::const_iterator; private: DocMap _docs; public: diff --git a/searchcore/src/vespa/searchcorespi/flush/flushtask.h b/searchcore/src/vespa/searchcorespi/flush/flushtask.h index a4de3f65fff..699aa1f9ea6 100644 --- a/searchcore/src/vespa/searchcorespi/flush/flushtask.h +++ b/searchcore/src/vespa/searchcorespi/flush/flushtask.h @@ -9,7 +9,7 @@ namespace searchcorespi { class FlushTask : public vespalib::Executor::Task { public: - typedef std::unique_ptr<FlushTask> UP; + using UP = std::unique_ptr<FlushTask>; virtual search::SerialNum getFlushSerial() const = 0; }; diff --git a/searchcore/src/vespa/searchcorespi/index/iindexcollection.h b/searchcore/src/vespa/searchcorespi/index/iindexcollection.h index 1cbf994b44f..c05e8b3a34c 100644 --- a/searchcore/src/vespa/searchcorespi/index/iindexcollection.h +++ b/searchcore/src/vespa/searchcorespi/index/iindexcollection.h @@ -15,8 +15,8 @@ class IIndexCollection { protected: using ISourceSelector = search::queryeval::ISourceSelector; public: - typedef std::unique_ptr<IIndexCollection> UP; - typedef std::shared_ptr<IIndexCollection> SP; + using UP = std::unique_ptr<IIndexCollection>; + using SP = std::shared_ptr<IIndexCollection>; virtual ~IIndexCollection() {} diff --git a/searchcore/src/vespa/searchcorespi/index/iindexmanager.h b/searchcore/src/vespa/searchcorespi/index/iindexmanager.h index a4173b41aa5..a11ae12f26d 100644 --- a/searchcore/src/vespa/searchcorespi/index/iindexmanager.h +++ b/searchcore/src/vespa/searchcorespi/index/iindexmanager.h @@ -73,8 +73,8 @@ public: virtual bool reconfigure(std::unique_ptr<Configure> configure) = 0; }; - typedef std::unique_ptr<IIndexManager> UP; - typedef std::shared_ptr<IIndexManager> SP; + using UP = std::unique_ptr<IIndexManager>; + using SP = std::shared_ptr<IIndexManager>; virtual ~IIndexManager() = default; diff --git a/searchcore/src/vespa/searchcorespi/index/indexmaintainer.cpp b/searchcore/src/vespa/searchcorespi/index/indexmaintainer.cpp index d70728e0d2f..6712e5b7449 100644 --- a/searchcore/src/vespa/searchcorespi/index/indexmaintainer.cpp +++ b/searchcore/src/vespa/searchcorespi/index/indexmaintainer.cpp @@ -789,7 +789,7 @@ IndexMaintainer::doneSetSchema(SetSchemaArgs &args, IMemoryIndex::SP &newIndex) { assert(_ctx.getThreadingService().master().isCurrentThread()); // with idle index executor LockGuard state_lock(_state_lock); - typedef FixedSourceSelector::SaveInfo SaveInfo; + using SaveInfo = FixedSourceSelector::SaveInfo; args._oldSchema = _schema; // Delay destruction args._oldIndex = _current_index; // Delay destruction args._oldSourceList = _source_list; // Delay destruction diff --git a/searchcore/src/vespa/searchcorespi/index/indexmaintainer.h b/searchcore/src/vespa/searchcorespi/index/indexmaintainer.h index b3fb14e1c2e..9328b1954e4 100644 --- a/searchcore/src/vespa/searchcorespi/index/indexmaintainer.h +++ b/searchcore/src/vespa/searchcorespi/index/indexmaintainer.h @@ -40,9 +40,9 @@ class IndexMaintainer : public IIndexManager, */ class FrozenMemoryIndexRef { public: - typedef search::FixedSourceSelector::SaveInfo SaveInfo; - typedef search::SerialNum SerialNum; - typedef std::shared_ptr<SaveInfo> SaveInfoSP; + using SaveInfo = search::FixedSourceSelector::SaveInfo; + using SerialNum = search::SerialNum; + using SaveInfoSP = std::shared_ptr<SaveInfo>; IMemoryIndex::SP _index; SerialNum _serialNum; diff --git a/searchcore/src/vespa/searchcorespi/index/indexsearchable.h b/searchcore/src/vespa/searchcorespi/index/indexsearchable.h index 609d7854351..85e274fa0e0 100644 --- a/searchcore/src/vespa/searchcorespi/index/indexsearchable.h +++ b/searchcore/src/vespa/searchcorespi/index/indexsearchable.h @@ -37,7 +37,7 @@ protected: using IAttributeContext = search::attribute::IAttributeContext; using Blueprint = search::queryeval::Blueprint; public: - typedef std::shared_ptr<IndexSearchable> SP; + using SP = std::shared_ptr<IndexSearchable>; /** * Returns the searchable stats for this index searchable. diff --git a/searchcore/src/vespa/searchcorespi/index/warmupindexcollection.h b/searchcore/src/vespa/searchcorespi/index/warmupindexcollection.h index 2623de5b98f..2bef9df4872 100644 --- a/searchcore/src/vespa/searchcorespi/index/warmupindexcollection.h +++ b/searchcore/src/vespa/searchcorespi/index/warmupindexcollection.h @@ -29,7 +29,7 @@ class WarmupIndexCollection : public ISearchableIndexCollection, { using WarmupConfig = index::WarmupConfig; public: - typedef std::shared_ptr<WarmupIndexCollection> SP; + using SP = std::shared_ptr<WarmupIndexCollection>; WarmupIndexCollection(const WarmupConfig & warmupConfig, ISearchableIndexCollection::SP prev, ISearchableIndexCollection::SP next, @@ -71,8 +71,8 @@ public: bool doUnpack() const { return _warmupConfig.getUnpack(); } void drainPending(); private: - typedef search::fef::MatchData MatchData; - typedef vespalib::Executor::Task Task; + using MatchData = search::fef::MatchData; + using Task = vespalib::Executor::Task; class WarmupRequestContext : public IRequestContext { using IAttributeVector = search::attribute::IAttributeVector; using AttributeBlueprintParams = search::attribute::AttributeBlueprintParams; |