Skip to content

Commit 753d2b1

Browse files
committed
util: fix clang-tidy modernize-use-equals-default error
mp/include/mp/util.h:173:5: error: use '= default' to define a trivial destructor [modernize-use-equals-default,-warnings-as-errors] 173 | ~Lock() MP_RELEASE() {} | ^ ~~ | = default;
1 parent ae4f1dc commit 753d2b1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/mp/util.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ class MP_CAPABILITY("mutex") Mutex {
174174
class MP_SCOPED_CAPABILITY Lock {
175175
public:
176176
explicit Lock(Mutex& m) MP_ACQUIRE(m) : m_lock(m.m_mutex) {}
177-
~Lock() MP_RELEASE() {}
177+
~Lock() MP_RELEASE() = default;
178178
void unlock() MP_RELEASE() { m_lock.unlock(); }
179179
void lock() MP_ACQUIRE() { m_lock.lock(); }
180180
void assert_locked(Mutex& mutex) MP_ASSERT_CAPABILITY() MP_ASSERT_CAPABILITY(mutex)

0 commit comments

Comments
 (0)