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
Revise to fool cppcheck.
[simgrid.git]
/
src
/
xbt
/
OsSemaphore.hpp
diff --git
a/src/xbt/OsSemaphore.hpp
b/src/xbt/OsSemaphore.hpp
index
6459850
..
f6e7083
100644
(file)
--- a/
src/xbt/OsSemaphore.hpp
+++ b/
src/xbt/OsSemaphore.hpp
@@
-10,12
+10,12
@@
namespace simgrid {
namespace xbt {
class XBT_PUBLIC OsSemaphore {
public:
namespace xbt {
class XBT_PUBLIC OsSemaphore {
public:
-
inline OsSemaphore(unsigned int uiCount) : capa_(uiCount
) {}
+
explicit inline OsSemaphore(unsigned int capa) : capa_(capa
) {}
inline void acquire()
{
std::unique_lock<std::mutex> lock(mutex_);
inline void acquire()
{
std::unique_lock<std::mutex> lock(mutex_);
- condition_.wait(lock, [
&]() -> bool
{ return capa_ > 0; });
+ condition_.wait(lock, [
this]()
{ return capa_ > 0; });
--capa_;
}
--capa_;
}