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
[sonar] Initialize data members with class initializers, or initialization lists.
[simgrid.git]
/
include
/
simgrid
/
s4u
/
Barrier.hpp
diff --git
a/include/simgrid/s4u/Barrier.hpp
b/include/simgrid/s4u/Barrier.hpp
index
db8e05e
..
2076155
100644
(file)
--- a/
include/simgrid/s4u/Barrier.hpp
+++ b/
include/simgrid/s4u/Barrier.hpp
@@
-20,8
+20,8
@@
namespace s4u {
class XBT_PUBLIC Barrier {
private:
class XBT_PUBLIC Barrier {
private:
- MutexPtr mutex_;
- ConditionVariablePtr cond_;
+ MutexPtr mutex_
= Mutex::create()
;
+ ConditionVariablePtr cond_
= ConditionVariable::create()
;
unsigned int expected_actors_;
unsigned int arrived_actors_ = 0;
unsigned int expected_actors_;
unsigned int arrived_actors_ = 0;
@@
-30,7
+30,7
@@
private:
public:
/** Creates a barrier for the given amount of actors */
public:
/** Creates a barrier for the given amount of actors */
- explicit Barrier(unsigned int
count);
+ explicit Barrier(unsigned int
expected_processes) : expected_actors_(expected_processes) {}
#ifndef DOXYGEN
~Barrier() = default;
Barrier(Barrier const&) = delete;
#ifndef DOXYGEN
~Barrier() = default;
Barrier(Barrier const&) = delete;