From 6243803018ba5d8f4bd280b2288c04b5451c14f5 Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Tue, 9 Jun 2020 00:32:48 +0200 Subject: [PATCH] address a new g++-10 warnings * spot/twa/twa.hh (set_named_prop): Declare the lambda as noexcept. * spot/twaalgos/couvreurnew.cc (acss_states): Likewise. --- spot/twa/twa.hh | 3 ++- spot/twaalgos/couvreurnew.cc | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/spot/twa/twa.hh b/spot/twa/twa.hh index 7a5fa2897..426d44b31 100644 --- a/spot/twa/twa.hh +++ b/spot/twa/twa.hh @@ -1120,7 +1120,8 @@ namespace spot template void set_named_prop(std::string s, T* val) { - set_named_prop(s, val, [](void *p) { delete static_cast(p); }); + set_named_prop(s, val, + [](void *p) noexcept { delete static_cast(p); }); } /// \brief Erase a named property diff --git a/spot/twaalgos/couvreurnew.cc b/spot/twaalgos/couvreurnew.cc index 1414060ef..ee6130226 100644 --- a/spot/twaalgos/couvreurnew.cc +++ b/spot/twaalgos/couvreurnew.cc @@ -360,7 +360,7 @@ namespace spot { int scc_root = ecs_->root.top().index; return T::h_count(ecs_->h, - [scc_root](int s) { return s >= scc_root; }); + [scc_root](int s) noexcept { return s >= scc_root; }); } twa_run_ptr