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/src/apps | |
parent | bc97f528bf6ca32750cadb84901beee144c03e41 (diff) |
Change from typedef to using in searchcore.
Diffstat (limited to 'searchcore/src/apps')
4 files changed, 22 insertions, 22 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); } |