Skip to content

Commit ed91b89

Browse files
authored
Resolve noexcept warnings on lambdas (#463)
When running with additional warnings enabled, a couple lambdas produce a warning that they should be declared with noexcept. This addresses the lambdas that had been identified while building. Signed-off-by: Ben Magistro <[email protected]>
1 parent 5adecb5 commit ed91b89

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/g3log/active.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ namespace kjellkod {
4848

4949
public:
5050
virtual ~Active() {
51-
send([this] { done_ = true;});
51+
send([this]() noexcept { done_ = true;});
5252
thd_.join();
5353
}
5454

src/g3log/logworker.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ namespace g3 {
127127
/// This will clear/remove all the sinks. If a sink shared_ptr was retrieved via the sink
128128
/// handle then the sink will be removed internally but will live on in the client's instance
129129
void removeAllSinks() {
130-
auto bg_clear_sink_call = [this] { _impl._sinks.clear(); };
130+
auto bg_clear_sink_call = [this]() noexcept { _impl._sinks.clear(); };
131131
auto token_cleared = g3::spawn_task(bg_clear_sink_call, _impl._bg.get());
132132
token_cleared.wait();
133133
}

0 commit comments

Comments
 (0)