From f2a347a1d1e4240a63005f8a9108502e4ff714b0 Mon Sep 17 00:00:00 2001 From: Tor Egge Date: Sat, 26 Feb 2022 23:44:11 +0100 Subject: Remove inlining warnings (staging_vespalib). --- staging_vespalib/src/tests/state_server/state_server_test.cpp | 9 +++++++++ staging_vespalib/src/vespa/vespalib/util/programoptions.cpp | 4 ++++ staging_vespalib/src/vespa/vespalib/util/programoptions.h | 7 +++++++ 3 files changed, 20 insertions(+) (limited to 'staging_vespalib') 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 &) 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 my_params; + ~SamplingHandler() override; vespalib::string get(const vespalib::string &host, const vespalib::string &path, const std::map ¶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::set(const std::vector& arguments) override; void setDefault() override { _number = _defaultValue; } @@ -270,6 +271,9 @@ struct ProgramOptions::NumberOptionParser : public OptionParser { } }; +template +ProgramOptions::NumberOptionParser::~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&) 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& arguments) override { _value = arguments[0]; } void setDefault() override { _value = _defaultValue; } -- cgit v1.2.3