]> AND Public Git Repository - simgrid.git/blobdiff - examples/cpp/maestro-set/s4u-maestro-set.cpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Use empty() to check for container emptiness.
[simgrid.git] / examples / cpp / maestro-set / s4u-maestro-set.cpp
index 3f5e8d822e3a18abf4febe60cf1f69b915f800ea..81779a29ed7e11d0be4144ca99a28be3e68a7017 100644 (file)
@@ -68,14 +68,13 @@ int main(int argc, char* argv[])
 
   simgrid::s4u::Engine e(&argc, argv);
 
-  if (argc != 2) {
-    XBT_CRITICAL("Usage: %s platform_file\n", argv[0]);
-    xbt_die("example: %s ../platforms/small_platform.xml\n", argv[0]);
-  }
+  xbt_assert(argc == 2, "Usage: %s platform_file\n"
+                        "example: %s ../platforms/small_platform.xml\n",
+             argv[0], argv[0]);
 
   e.load_platform(argv[1]);
 
-  /* Become one of the simulated process (must be done after the platform creation, or the host won't exist). */
+  /* Become one of the simulated actors (must be done after the platform creation, or the host won't exist). */
   sg_actor_attach("sender", nullptr, simgrid::s4u::Host::by_name("Tremblay"), nullptr);
 
   ensure_root_tid(); // Only useful in this test: we ensure that simgrid is not broken and that this code is executed in