Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
simplify example
authorFred Suter <suterf@ornl.gov>
Wed, 31 May 2023 20:27:26 +0000 (16:27 -0400)
committerFred Suter <suterf@ornl.gov>
Wed, 31 May 2023 20:27:26 +0000 (16:27 -0400)
examples/cpp/dag-simple/s4u-dag-simple.cpp

index 8179729..78a0158 100644 (file)
@@ -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<const sg4::Exec&>(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"));