Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
this is a bool, say it. It's C++, dude
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Mon, 30 Apr 2018 15:27:59 +0000 (17:27 +0200)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Mon, 30 Apr 2018 15:27:59 +0000 (17:27 +0200)
src/include/simgrid/sg_config.hpp
src/simgrid/sg_config.cpp

index 998d724..0297458 100644 (file)
@@ -11,7 +11,7 @@
 /** Config Globals */
 
 XBT_PUBLIC_DATA int _sg_cfg_init_status;
 /** Config Globals */
 
 XBT_PUBLIC_DATA int _sg_cfg_init_status;
-XBT_PUBLIC_DATA int _sg_cfg_exit_asap;
+XBT_PUBLIC_DATA bool _sg_cfg_exit_asap;
 
 XBT_PUBLIC void sg_config_init(int* argc, char** argv);
 XBT_PUBLIC void sg_config_finalize();
 
 XBT_PUBLIC void sg_config_init(int* argc, char** argv);
 XBT_PUBLIC void sg_config_finalize();
index 70affbf..dc79bbd 100644 (file)
@@ -27,9 +27,13 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_config, surf, "About the configuration of S
 int _sg_cfg_init_status = 0;
 
 /* instruct the upper layer (simix or simdag) to exit as soon as possible */
 int _sg_cfg_init_status = 0;
 
 /* instruct the upper layer (simix or simdag) to exit as soon as possible */
-int _sg_cfg_exit_asap = 0;
+bool _sg_cfg_exit_asap = false;
 
 
-#define sg_cfg_exit_early() do { _sg_cfg_exit_asap = 1; return; } while (0)
+#define sg_cfg_exit_early()                                                                                            \
+  do {                                                                                                                 \
+    _sg_cfg_exit_asap = true;                                                                                          \
+    return;                                                                                                            \
+  } while (0)
 
 /* Parse the command line, looking for options */
 static void sg_config_cmd_line(int *argc, char **argv)
 
 /* Parse the command line, looking for options */
 static void sg_config_cmd_line(int *argc, char **argv)