Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Change "if(...) xbt_die(...)" to "xbt_assert(...)".
[simgrid.git] / examples / cpp / maestro-set / s4u-maestro-set.cpp
index 3f5e8d8..5ffa6e6 100644 (file)
@@ -68,10 +68,9 @@ 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]);