diff options
author | Tor Egge <Tor.Egge@broadpark.no> | 2020-10-11 21:49:14 +0200 |
---|---|---|
committer | Tor Egge <Tor.Egge@broadpark.no> | 2020-10-11 21:49:14 +0200 |
commit | 2336277e700ec5ea9aa7582e93000cece7f7b120 (patch) | |
tree | b267bfd1cabb3d9423ba2509c2bf299a803081d1 /vespalib | |
parent | 982a1b1804b8773be2c5db13535fa0b0e33928b1 (diff) |
Eliminate noexcept warnings.
Diffstat (limited to 'vespalib')
7 files changed, 8 insertions, 8 deletions
diff --git a/vespalib/src/tests/datastore/unique_store_dictionary/unique_store_dictionary_test.cpp b/vespalib/src/tests/datastore/unique_store_dictionary/unique_store_dictionary_test.cpp index 37a22108dc5..6a9215c3eb9 100644 --- a/vespalib/src/tests/datastore/unique_store_dictionary/unique_store_dictionary_test.cpp +++ b/vespalib/src/tests/datastore/unique_store_dictionary/unique_store_dictionary_test.cpp @@ -40,7 +40,7 @@ struct DictionaryReadTest : public ::testing::Test { { } DictionaryReadTest& add(uint32_t value) { - auto result = dict.add(Comparator(value), [=]() { return EntryRef(value); }); + auto result = dict.add(Comparator(value), [=]() noexcept { return EntryRef(value); }); assert(result.inserted()); return *this; } diff --git a/vespalib/src/tests/detect_type_benchmark/detect_type_benchmark.cpp b/vespalib/src/tests/detect_type_benchmark/detect_type_benchmark.cpp index 6d178093069..71c4a7856c8 100644 --- a/vespalib/src/tests/detect_type_benchmark/detect_type_benchmark.cpp +++ b/vespalib/src/tests/detect_type_benchmark/detect_type_benchmark.cpp @@ -57,7 +57,7 @@ struct CheckType { }; struct Nop { - void operator()() const {} + void operator()() const noexcept {} }; //----------------------------------------------------------------------------- diff --git a/vespalib/src/tests/portal/portal_test.cpp b/vespalib/src/tests/portal/portal_test.cpp index 0bd029c0c3a..07d3b9e1bfb 100644 --- a/vespalib/src/tests/portal/portal_test.cpp +++ b/vespalib/src/tests/portal/portal_test.cpp @@ -202,7 +202,7 @@ TEST("require that get requests dropped on the floor returns HTTP error") { vespalib::string path = "/test"; auto portal = Portal::create(null_crypto(), 0); auto expect = make_expected_error(500, "Internal Server Error"); - MyGetHandler handler([](Portal::GetRequest){}); + MyGetHandler handler([](Portal::GetRequest) noexcept {}); auto bound = portal->bind(path, handler); auto result = fetch(portal->listen_port(), null_crypto(), path); EXPECT_EQUAL(result, expect); diff --git a/vespalib/src/tests/time_tracer/time_tracer_test.cpp b/vespalib/src/tests/time_tracer/time_tracer_test.cpp index d7e2e0d579a..6d55e867ba5 100644 --- a/vespalib/src/tests/time_tracer/time_tracer_test.cpp +++ b/vespalib/src/tests/time_tracer/time_tracer_test.cpp @@ -67,8 +67,8 @@ TEST("require that records are extracted inversely ordered by end time per threa } TEST("benchmark time sampling") { - double min_stamp_us = 1000000.0 * BenchmarkTimer::benchmark([](){ (void) TimeTracer::now(); }, 1.0); - double min_sample_us = 1000000.0 * BenchmarkTimer::benchmark([](){ TT_Sample my_sample(my_tag); }, 1.0); + double min_stamp_us = 1000000.0 * BenchmarkTimer::benchmark([]() noexcept { (void) TimeTracer::now(); }, 1.0); + double min_sample_us = 1000000.0 * BenchmarkTimer::benchmark([]() noexcept { TT_Sample my_sample(my_tag); }, 1.0); fprintf(stderr, "min timestamp time: %g us\n", min_stamp_us); fprintf(stderr, "min sample time: %g us\n", min_sample_us); fprintf(stderr, "estimated non-clock overhead: %g us\n", (min_sample_us - (min_stamp_us * 2.0))); diff --git a/vespalib/src/vespa/vespalib/net/socket_address.h b/vespalib/src/vespa/vespalib/net/socket_address.h index 2b75eae8948..543af44a56e 100644 --- a/vespalib/src/vespa/vespalib/net/socket_address.h +++ b/vespalib/src/vespa/vespalib/net/socket_address.h @@ -48,7 +48,7 @@ public: vespalib::string name() const; vespalib::string spec() const; SocketHandle connect(const std::function<bool(SocketHandle&)> &tweak) const; - SocketHandle connect() const { return connect([](SocketHandle&){ return true; }); } + SocketHandle connect() const { return connect([](SocketHandle&) noexcept { return true; }); } SocketHandle connect_async() const { return connect([](SocketHandle &handle){ return handle.set_blocking(false); }); } diff --git a/vespalib/src/vespa/vespalib/portal/portal.h b/vespalib/src/vespa/vespalib/portal/portal.h index 1c5b9f88a5f..5ac2d85a6e3 100644 --- a/vespalib/src/vespa/vespalib/portal/portal.h +++ b/vespalib/src/vespa/vespalib/portal/portal.h @@ -53,7 +53,7 @@ public: GetRequest(const GetRequest &rhs) = delete; GetRequest &operator=(const GetRequest &rhs) = delete; GetRequest &operator=(GetRequest &&rhs) = delete; - GetRequest(GetRequest &&rhs) : _conn(rhs._conn) { + GetRequest(GetRequest &&rhs) noexcept : _conn(rhs._conn) { rhs._conn = nullptr; } bool active() const { return (_conn != nullptr); } diff --git a/vespalib/src/vespa/vespalib/portal/reactor.h b/vespalib/src/vespa/vespalib/portal/reactor.h index a7961c3c943..408f358d31b 100644 --- a/vespalib/src/vespa/vespalib/portal/reactor.h +++ b/vespalib/src/vespa/vespalib/portal/reactor.h @@ -60,7 +60,7 @@ private: public: Reactor(std::function<int()> tick); - Reactor() : Reactor([](){ return -1; }) {} + Reactor() : Reactor([]() noexcept { return -1; }) {} ~Reactor(); Token::UP attach(EventHandler &handler, int fd, bool read, bool write); }; |