Skip to content

Commit

Permalink
Resolve noexcept warnings on lambdas (#463)
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
bmagistro authored Sep 14, 2022
1 parent 5adecb5 commit ed91b89
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/g3log/active.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ namespace kjellkod {

public:
virtual ~Active() {
send([this] { done_ = true;});
send([this]() noexcept { done_ = true;});
thd_.join();
}

Expand Down
2 changes: 1 addition & 1 deletion src/g3log/logworker.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ namespace g3 {
/// This will clear/remove all the sinks. If a sink shared_ptr was retrieved via the sink
/// handle then the sink will be removed internally but will live on in the client's instance
void removeAllSinks() {
auto bg_clear_sink_call = [this] { _impl._sinks.clear(); };
auto bg_clear_sink_call = [this]() noexcept { _impl._sinks.clear(); };
auto token_cleared = g3::spawn_task(bg_clear_sink_call, _impl._bg.get());
token_cleared.wait();
}
Expand Down

0 comments on commit ed91b89

Please sign in to comment.