mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-06-01 23:38:23 -04:00
strat: use m_ for member variables
This commit is contained in:
parent
ce28591ab2
commit
a595c232b9
425 changed files with 8531 additions and 8484 deletions
|
@ -40,31 +40,31 @@ namespace ams::tipc {
|
|||
public:
|
||||
static constexpr size_t TypeSize = sizeof(T);
|
||||
private:
|
||||
T *ptr;
|
||||
T *m_ptr;
|
||||
public:
|
||||
constexpr Out(uintptr_t p) : ptr(reinterpret_cast<T *>(p)) { /* ... */ }
|
||||
constexpr Out(T *p) : ptr(p) { /* ... */ }
|
||||
constexpr Out(const tipc::PointerAndSize &pas) : ptr(reinterpret_cast<T *>(pas.GetAddress())) { /* TODO: Is AMS_ABORT_UNLESS(pas.GetSize() >= sizeof(T)); necessary? */ }
|
||||
constexpr Out(uintptr_t p) : m_ptr(reinterpret_cast<T *>(p)) { /* ... */ }
|
||||
constexpr Out(T *p) : m_ptr(p) { /* ... */ }
|
||||
constexpr Out(const tipc::PointerAndSize &pas) : m_ptr(reinterpret_cast<T *>(pas.GetAddress())) { /* TODO: Is AMS_ABORT_UNLESS(pas.GetSize() >= sizeof(T)); necessary? */ }
|
||||
|
||||
ALWAYS_INLINE void SetValue(const T& value) const {
|
||||
*this->ptr = value;
|
||||
*m_ptr = value;
|
||||
}
|
||||
|
||||
ALWAYS_INLINE const T &GetValue() const {
|
||||
return *this->ptr;
|
||||
return *m_ptr;
|
||||
}
|
||||
|
||||
ALWAYS_INLINE T *GetPointer() const {
|
||||
return this->ptr;
|
||||
return m_ptr;
|
||||
}
|
||||
|
||||
/* Convenience operators. */
|
||||
ALWAYS_INLINE T &operator*() const {
|
||||
return *this->ptr;
|
||||
return *m_ptr;
|
||||
}
|
||||
|
||||
ALWAYS_INLINE T *operator->() const {
|
||||
return this->ptr;
|
||||
return m_ptr;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue