1
0
Fork 0
mirror of https://github.com/Atmosphere-NX/Atmosphere.git synced 2024-09-20 05:53:24 +01:00

style cleanup

This commit is contained in:
Michael Scire 2020-01-31 16:38:33 -08:00
parent 2355047715
commit 5e4307046a

View file

@ -23,7 +23,7 @@ namespace ams::kern {
template<typename T>
concept KLockable = !std::is_reference<T>::value && requires (T &t) {
{ t.Lock() } -> std::same_as<void>;
{ t.Lock() } -> std::same_as<void>;
{ t.Unlock() } -> std::same_as<void>;
};
@ -37,7 +37,7 @@ namespace ams::kern {
T *lock_ptr;
public:
explicit ALWAYS_INLINE KScopedLock(T *l) : lock_ptr(l) { this->lock_ptr->Lock(); }
explicit ALWAYS_INLINE KScopedLock(T &l) : KScopedLock(std::addressof(l)) { /* ... */}
explicit ALWAYS_INLINE KScopedLock(T &l) : KScopedLock(std::addressof(l)) { /* ... */ }
ALWAYS_INLINE ~KScopedLock() { this->lock_ptr->Unlock(); }
};