diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2017-10-06 09:58:05 +0200 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2017-10-06 09:58:05 +0200 |
commit | fad67cd9ed0a6fd86ecfd476581ccde391118558 (patch) | |
tree | 4f05e2899760b7eb9f17d73bf0da52386c383ddd | |
parent | 9e89f2e7112038c921292d530fa49e85233495bb (diff) |
Use extra constructor and chaining instead of default arguments.
-rw-r--r-- | searchcore/src/vespa/searchcore/proton/server/documentdbconfigmanager.cpp | 12 | ||||
-rw-r--r-- | searchcore/src/vespa/searchcore/proton/server/documentdbconfigmanager.h | 1 |
2 files changed, 7 insertions, 6 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/server/documentdbconfigmanager.cpp b/searchcore/src/vespa/searchcore/proton/server/documentdbconfigmanager.cpp index c7d87bbabce..f45fc658129 100644 --- a/searchcore/src/vespa/searchcore/proton/server/documentdbconfigmanager.cpp +++ b/searchcore/src/vespa/searchcore/proton/server/documentdbconfigmanager.cpp @@ -7,14 +7,13 @@ #include <vespa/config-summarymap.h> #include <vespa/config/file_acquirer/file_acquirer.h> #include <vespa/config/helper/legacy.h> -#include <vespa/log/log.h> #include <vespa/searchcommon/common/schemaconfigurer.h> #include <vespa/searchlib/index/schemautil.h> #include <vespa/searchsummary/config/config-juniperrc.h> #include <vespa/searchcore/config/config-ranking-constants.h> #include <vespa/vespalib/time/time_box.h> -#include <thread> +#include <vespa/log/log.h> LOG_SETUP(".proton.server.documentdbconfigmanager"); using namespace config; @@ -377,9 +376,11 @@ forwardConfig(const BootstrapConfig::SP & config) } } +DocumentDBConfigHelper::DocumentDBConfigHelper(const config::DirSpec &spec, const vespalib::string &docTypeName) + : DocumentDBConfigHelper(spec, docTypeName, config::ConfigKeySet()) +{ } -DocumentDBConfigHelper::DocumentDBConfigHelper(const config::DirSpec &spec, - const vespalib::string &docTypeName, +DocumentDBConfigHelper::DocumentDBConfigHelper(const config::DirSpec &spec, const vespalib::string &docTypeName, const config::ConfigKeySet &extraConfigKeys) : _mgr("", docTypeName), _retriever() @@ -394,8 +395,7 @@ DocumentDBConfigHelper::~DocumentDBConfigHelper() { } bool DocumentDBConfigHelper::nextGeneration(int timeoutInMillis) { - config::ConfigSnapshot - snapshot(_retriever->getBootstrapConfigs(timeoutInMillis)); + config::ConfigSnapshot snapshot(_retriever->getBootstrapConfigs(timeoutInMillis)); if (snapshot.empty()) return false; _mgr.update(snapshot); diff --git a/searchcore/src/vespa/searchcore/proton/server/documentdbconfigmanager.h b/searchcore/src/vespa/searchcore/proton/server/documentdbconfigmanager.h index 171a96dff7c..ebab75da1b0 100644 --- a/searchcore/src/vespa/searchcore/proton/server/documentdbconfigmanager.h +++ b/searchcore/src/vespa/searchcore/proton/server/documentdbconfigmanager.h @@ -53,6 +53,7 @@ public: class DocumentDBConfigHelper { public: + DocumentDBConfigHelper(const config::DirSpec &spec, const vespalib::string &docTypeName); DocumentDBConfigHelper(const config::DirSpec &spec, const vespalib::string &docTypeName, const config::ConfigKeySet &extraConfigKeys); |