Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Remove the -Wformat-security warning
[simgrid.git] / include / xbt / automaton.hpp
index aea5fc6eedbe0388e97a4c3077dc9ee2fa2a7000..8c4ac2e9b5b8b4e4be8d1863a5b3c69f4ac1b377 100644 (file)
@@ -23,11 +23,7 @@ template <class F> 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; });
 }
 
 }