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
set will fail property for stack overoflow on win and osx
[simgrid.git]
/
src
/
mc
/
mc_pair.cpp
diff --git
a/src/mc/mc_pair.cpp
b/src/mc/mc_pair.cpp
index
7f754cd
..
345a8f2
100644
(file)
--- a/
src/mc/mc_pair.cpp
+++ b/
src/mc/mc_pair.cpp
@@
-1,19
+1,22
@@
-/* Copyright (c) 2013-201
4
. The SimGrid Team.
+/* Copyright (c) 2013-201
5
. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include <xbt.h>
-#include "mc_liveness.h"
-#include "mc_private.h"
+#include <xbt/dynar.h>
+#include <xbt/sysdep.h>
-extern "C" {
+#include "src/mc/mc_liveness.h"
+#include "src/mc/mc_private.h"
-mc_pair_t MC_pair_new()
+namespace simgrid {
+namespace mc {
+
+simgrid::mc::Pair* pair_new()
{
{
-
mc_pair_t p = NULL
;
- p = xbt_new0(s
_mc_pair_t
, 1);
+
simgrid::mc::Pair* p = nullptr
;
+ p = xbt_new0(s
imgrid::mc::Pair
, 1);
p->num = ++mc_stats->expanded_pairs;
p->exploration_started = 0;
p->search_cycle = 0;
p->num = ++mc_stats->expanded_pairs;
p->exploration_started = 0;
p->search_cycle = 0;
@@
-21,19
+24,15
@@
mc_pair_t MC_pair_new()
return p;
}
return p;
}
-void
MC_pair_delete(mc_pair_t
p)
+void
pair_delete(simgrid::mc::Pair*
p)
{
{
- p->automaton_state =
NULL
;
+ p->automaton_state =
nullptr
;
if(p->visited_pair_removed)
MC_state_delete(p->graph_state, 1);
xbt_dynar_free(&(p->atomic_propositions));
xbt_free(p);
if(p->visited_pair_removed)
MC_state_delete(p->graph_state, 1);
xbt_dynar_free(&(p->atomic_propositions));
xbt_free(p);
- p = NULL;
-}
-
-void mc_pair_free_voidp(void *p)
-{
- MC_pair_delete((mc_pair_t) * (void **) p);
+ p = nullptr;
}
}
}
}
+}
\ No newline at end of file