From: Fred Suter Date: Wed, 31 May 2023 20:27:26 +0000 (-0400) Subject: simplify example X-Git-Tag: v3.34~84 X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/0711d069cdfa51d648da943d017ea36850aadfe0?hp=206d815a5fa8cea6ab00e40b1736d2a4bf2c50b7 simplify example --- diff --git a/examples/cpp/dag-simple/s4u-dag-simple.cpp b/examples/cpp/dag-simple/s4u-dag-simple.cpp index 81797292c4..78a01587db 100644 --- a/examples/cpp/dag-simple/s4u-dag-simple.cpp +++ b/examples/cpp/dag-simple/s4u-dag-simple.cpp @@ -19,9 +19,7 @@ int main(int argc, char* argv[]) auto fafard = e.host_by_name("Fafard"); // Display the details on vetoed activities - sg4::Exec::on_veto_cb([](sg4::Exec const& a) { - const auto& exec = static_cast(a); // all activities are execs in this example - + sg4::Exec::on_veto_cb([](sg4::Exec const& exec) { XBT_INFO("Execution '%s' vetoed. Dependencies: %s; Ressources: %s", exec.get_cname(), (exec.dependencies_solved() ? "solved" : "NOT solved"), (exec.is_assigned() ? "assigned" : "NOT assigned"));