kern: refactor to use m_ for member variables

This commit is contained in:
Michael Scire
2020-12-17 17:18:47 -08:00
parent b8471bcd4e
commit 92f1e2d100
135 changed files with 3727 additions and 3734 deletions

View File

@@ -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(); }
};
}