diff options
author | Tor Egge <Tor.Egge@online.no> | 2022-02-26 23:44:11 +0100 |
---|---|---|
committer | Tor Egge <Tor.Egge@online.no> | 2022-02-26 23:44:11 +0100 |
commit | f2a347a1d1e4240a63005f8a9108502e4ff714b0 (patch) | |
tree | 77614a599962e4ef41357ca8de65e5ccc7fab495 /staging_vespalib | |
parent | c1752debf75d310617d360a34e15a3ed21e7772a (diff) |
Remove inlining warnings (staging_vespalib).
Diffstat (limited to 'staging_vespalib')
3 files changed, 20 insertions, 0 deletions
diff --git a/staging_vespalib/src/tests/state_server/state_server_test.cpp b/staging_vespalib/src/tests/state_server/state_server_test.cpp index a7b72cd505e..5903970b740 100644 --- a/staging_vespalib/src/tests/state_server/state_server_test.cpp +++ b/staging_vespalib/src/tests/state_server/state_server_test.cpp @@ -117,6 +117,7 @@ TEST_FFFF("require that handler is selected based on longest matching url prefix } struct EchoHost : JsonGetHandler { + ~EchoHost() override; vespalib::string get(const vespalib::string &host, const vespalib::string &, const std::map<vespalib::string,vespalib::string> &) const override { @@ -124,6 +125,8 @@ struct EchoHost : JsonGetHandler { } }; +EchoHost::~EchoHost() = default; + TEST_FF("require that host is passed correctly", EchoHost(), HttpServer(0)) { auto token = f2.repo().bind(my_path, f1); EXPECT_EQUAL(make_string("%s:%d", HostName::get().c_str(), f2.port()), f2.host()); @@ -140,6 +143,7 @@ struct SamplingHandler : JsonGetHandler { mutable vespalib::string my_host; mutable vespalib::string my_path; mutable std::map<vespalib::string,vespalib::string> my_params; + ~SamplingHandler() override; vespalib::string get(const vespalib::string &host, const vespalib::string &path, const std::map<vespalib::string,vespalib::string> ¶ms) const override { @@ -153,6 +157,8 @@ struct SamplingHandler : JsonGetHandler { } }; +SamplingHandler::~SamplingHandler() = default; + TEST_FF("require that request parameters can be inspected", SamplingHandler(), HttpServer(0)) { auto token = f2.repo().bind("/foo", f1); @@ -361,6 +367,7 @@ TEST_FFFFF("require that custom handlers can be added to the state server", } struct EchoConsumer : MetricsProducer { + ~EchoConsumer() override; vespalib::string getMetrics(const vespalib::string &consumer) override { return "[\"" + consumer + "\"]"; } @@ -369,6 +376,8 @@ struct EchoConsumer : MetricsProducer { } }; +EchoConsumer::~EchoConsumer() = default; + TEST_FFFF("require that empty v1 metrics consumer defaults to 'statereporter'", SimpleHealthProducer(), EchoConsumer(), SimpleComponentConfigProducer(), StateApi(f1, f2, f3)) diff --git a/staging_vespalib/src/vespa/vespalib/util/programoptions.cpp b/staging_vespalib/src/vespa/vespalib/util/programoptions.cpp index 80381d494df..9ea7c1648d1 100644 --- a/staging_vespalib/src/vespa/vespalib/util/programoptions.cpp +++ b/staging_vespalib/src/vespa/vespalib/util/programoptions.cpp @@ -56,6 +56,10 @@ void ProgramOptions::NumberOptionParser<Number>::set(const std::vector<std::stri } } +ProgramOptions::FlagOptionParser::~FlagOptionParser() = default; + +ProgramOptions::StringOptionParser::~StringOptionParser() = default; + ProgramOptions::OptionParser::OptionParser( const std::string& nameList, uint32_t argCount, const std::string& desc) : _names(splitString(nameList, ' ')), diff --git a/staging_vespalib/src/vespa/vespalib/util/programoptions.h b/staging_vespalib/src/vespa/vespalib/util/programoptions.h index 0bd3eb7c3c9..0c75f9b2c72 100644 --- a/staging_vespalib/src/vespa/vespalib/util/programoptions.h +++ b/staging_vespalib/src/vespa/vespalib/util/programoptions.h @@ -262,6 +262,7 @@ struct ProgramOptions::NumberOptionParser : public OptionParser { _number(number), _defaultValue(defValue) {} + ~NumberOptionParser() override; void set(const std::vector<std::string>& arguments) override; void setDefault() override { _number = _defaultValue; } @@ -270,6 +271,9 @@ struct ProgramOptions::NumberOptionParser : public OptionParser { } }; +template<typename Number> +ProgramOptions::NumberOptionParser<Number>::~NumberOptionParser() = default; + struct ProgramOptions::BoolOptionParser : public OptionParser { bool& _value; bool _defaultValue; @@ -285,10 +289,12 @@ struct ProgramOptions::FlagOptionParser : public OptionParser { FlagOptionParser(const std::string& nameList, bool& value, const std::string& description); FlagOptionParser(const std::string& nameList, bool& value, const bool& unsetValue, const std::string& description); + ~FlagOptionParser() override; void set(const std::vector<std::string>&) override { _value = !_unsetValue; } void setDefault() override { _value = _unsetValue; } }; + struct ProgramOptions::StringOptionParser : public OptionParser { std::string& _value; std::string _defaultValue; @@ -296,6 +302,7 @@ struct ProgramOptions::StringOptionParser : public OptionParser { StringOptionParser(const std::string& nameList, std::string& value, const std::string& description); StringOptionParser(const std::string& nameList, std::string& value, const std::string& defVal, const std::string& desc); + ~StringOptionParser() override; void set(const std::vector<std::string>& arguments) override { _value = arguments[0]; } void setDefault() override { _value = _defaultValue; } |