mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-23 03:06:52 -04:00
kern: refactor to use m_ for member variables
This commit is contained in:
parent
0bf2ade76f
commit
968f50bc07
135 changed files with 3727 additions and 3734 deletions
|
@ -29,11 +29,11 @@ namespace ams::kern {
|
|||
NON_COPYABLE(KScopedLock);
|
||||
NON_MOVEABLE(KScopedLock);
|
||||
private:
|
||||
T *lock_ptr;
|
||||
T &m_lock;
|
||||
public:
|
||||
explicit ALWAYS_INLINE KScopedLock(T *l) : lock_ptr(l) { this->lock_ptr->Lock(); }
|
||||
explicit ALWAYS_INLINE KScopedLock(T &l) : KScopedLock(std::addressof(l)) { /* ... */ }
|
||||
ALWAYS_INLINE ~KScopedLock() { this->lock_ptr->Unlock(); }
|
||||
explicit ALWAYS_INLINE KScopedLock(T &l) : m_lock(l) { m_lock.Lock(); }
|
||||
explicit ALWAYS_INLINE KScopedLock(T *l) : KScopedLock(*l) { /* ... */ }
|
||||
ALWAYS_INLINE ~KScopedLock() { m_lock.Unlock(); }
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue