diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2020-12-04 19:51:29 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2020-12-04 19:51:29 +0000 |
commit | 9d03e663e2edf3c992dfba92f15ac597ca864530 (patch) | |
tree | 5902200b7984fbac82ca5d06cf0d843e466dd57f | |
parent | Add a check to satisfy an otherwise valid cppcheck (diff) | |
download | libadhocutil-9d03e663e2edf3c992dfba92f15ac597ca864530.tar.bz2 libadhocutil-9d03e663e2edf3c992dfba92f15ac597ca864530.tar.xz libadhocutil-9d03e663e2edf3c992dfba92f15ac597ca864530.zip |
Remove copy initialisation of locks in ScopeLock
-rw-r--r-- | libadhocutil/lockHelpers.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libadhocutil/lockHelpers.h b/libadhocutil/lockHelpers.h index 4bb285b..d306f9c 100644 --- a/libadhocutil/lockHelpers.h +++ b/libadhocutil/lockHelpers.h @@ -6,7 +6,7 @@ #define LIBADHOC_LOCK_WITHLINE(a) LIBADHOC_LOCK_CONCAT(a, __LINE__) #define BaseLock(l, lt) lt LIBADHOC_LOCK_WITHLINE(_lck)(l) -#define BaseScopeLock(l, lt) if (auto LIBADHOC_LOCK_WITHLINE(_lck) = lt(l)) +#define BaseScopeLock(l, lt) if (lt LIBADHOC_LOCK_WITHLINE(_lck) {l}) #define Lock(l) BaseLock(l, std::unique_lock) #define SharedLock(l) BaseLock(l, std::shared_lock) |