From 0711d069cdfa51d648da943d017ea36850aadfe0 Mon Sep 17 00:00:00 2001 From: Fred Suter Date: Wed, 31 May 2023 16:27:26 -0400 Subject: [PATCH] simplify example --- examples/cpp/dag-simple/s4u-dag-simple.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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")); -- 2.20.1