A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
simplify writing in model setup + may fix issue with unit-tests
[simgrid.git]
/
src
/
mc
/
mc_replay.hpp
diff --git
a/src/mc/mc_replay.hpp
b/src/mc/mc_replay.hpp
index 5558e5ada98ec397cf88a92255eccaca12fef0fa..823d93e6f43ec65094df8ddef617e999b7a6f17a 100644
(file)
--- a/
src/mc/mc_replay.hpp
+++ b/
src/mc/mc_replay.hpp
@@
-6,18
+6,23
@@
#ifndef SIMGRID_MC_REPLAY_H
#define SIMGRID_MC_REPLAY_H
#ifndef SIMGRID_MC_REPLAY_H
#define SIMGRID_MC_REPLAY_H
-#include
"src/mc/mc_config.hpp"
+#include
<string>
/** Replay path (if any) in string representation
*
* This is using the format generated by traceToString().
/** Replay path (if any) in string representation
*
* This is using the format generated by traceToString().
+ * Use a function to avoid static initialization order fiasco.
*/
*/
-#define MC_record_path (_sg_mc_record_path.get())
+inline auto& MC_record_path()
+{
+ static std::string value;
+ return value;
+}
/** Whether the replay mode is enabled */
static inline int MC_record_replay_is_active()
{
/** Whether the replay mode is enabled */
static inline int MC_record_replay_is_active()
{
- return not MC_record_path.empty();
+ return not MC_record_path
()
.empty();
}
#endif
}
#endif