mirror of
https://github.com/godotengine/godot.git
synced 2026-02-24 22:36:38 +03:00
Merge pull request #116280 from HEX-23/feature-nodiscard-mutexlock
Mark MutexLock as [[nodiscard]] to prevent misuse.
This commit is contained in:
@@ -69,7 +69,7 @@ public:
|
||||
};
|
||||
|
||||
template <typename MutexT>
|
||||
class MutexLock {
|
||||
class [[nodiscard]] MutexLock {
|
||||
mutable THREADING_NAMESPACE::unique_lock<typename MutexT::StdMutexType> lock;
|
||||
|
||||
public:
|
||||
@@ -114,7 +114,7 @@ public:
|
||||
};
|
||||
|
||||
template <typename MutexT>
|
||||
class MutexLock {
|
||||
class [[nodiscard]] MutexLock {
|
||||
public:
|
||||
MutexLock(const MutexT &p_mutex) {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user