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
Rely on template argument deduction (sonar, c++17).
[simgrid.git]
/
examples
/
cpp
/
synchro-mutex
/
s4u-synchro-mutex.cpp
diff --git
a/examples/cpp/synchro-mutex/s4u-synchro-mutex.cpp
b/examples/cpp/synchro-mutex/s4u-synchro-mutex.cpp
index
faa8d2b
..
a17d574
100644
(file)
--- a/
examples/cpp/synchro-mutex/s4u-synchro-mutex.cpp
+++ b/
examples/cpp/synchro-mutex/s4u-synchro-mutex.cpp
@@
-33,7
+33,7
@@
static void workerLockGuard(sg4::MutexPtr mutex, int& result)
{
// Simply use the std::lock_guard like this
// It's like a lock() that would do the unlock() automatically when getting out of scope
- std::lock_guard
<sg4::Mutex>
lock(*mutex);
+ std::lock_guard lock(*mutex);
// then you are in a safe zone
XBT_INFO("Hello s4u, I'm ready to compute after a lock_guard");