X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/08e7455d67920bbd7a87f440d00f2c1e071314a0..985e0a5509e230076d22095da54dd0123d2afe5e:/include/xbt/automaton.hpp diff --git a/include/xbt/automaton.hpp b/include/xbt/automaton.hpp index 01bd9e0863..18a7d6b693 100644 --- a/include/xbt/automaton.hpp +++ b/include/xbt/automaton.hpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2015-2021. The SimGrid Team. +/* Copyright (c) 2015-2023. The SimGrid Team. * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it @@ -11,8 +11,7 @@ #include -namespace simgrid { -namespace xbt { +namespace simgrid::xbt { /** Add a proposition to an automaton (the C++ way) * @@ -23,13 +22,8 @@ template xbt_automaton_propositional_symbol_t add_proposition(const_xb { auto* callback = new F(std::move(f)); return xbt_automaton_propositional_symbol_new_callback( - a, id, - [](void* callback) -> int { return (*(F*)callback)(); }, - callback, - [](void* callback) -> void { delete (F*)callback; } - ); + a, id, [](auto* cb) -> int { return (*(F*)cb)(); }, callback, [](auto* cb) -> void { delete (F*)cb; }); } -} -} +} // namespace simgrid::xbt #endif