mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-30 22:45:17 -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
|
@ -34,20 +34,20 @@ namespace ams::tipc {
|
|||
public:
|
||||
static constexpr u32 AdditionalAttributes = 0;
|
||||
private:
|
||||
const tipc::PointerAndSize pas;
|
||||
const tipc::PointerAndSize m_pas;
|
||||
protected:
|
||||
constexpr ALWAYS_INLINE uintptr_t GetAddressImpl() const {
|
||||
return this->pas.GetAddress();
|
||||
return m_pas.GetAddress();
|
||||
}
|
||||
|
||||
template<typename Entry>
|
||||
constexpr ALWAYS_INLINE size_t GetSizeImpl() const {
|
||||
return this->pas.GetSize() / sizeof(Entry);
|
||||
return m_pas.GetSize() / sizeof(Entry);
|
||||
}
|
||||
public:
|
||||
constexpr ALWAYS_INLINE BufferBase() : pas() { /* ... */ }
|
||||
constexpr ALWAYS_INLINE BufferBase(const tipc::PointerAndSize &_pas) : pas(_pas) { /* ... */ }
|
||||
constexpr ALWAYS_INLINE BufferBase(uintptr_t ptr, size_t sz) : pas(ptr, sz) { /* ... */ }
|
||||
constexpr ALWAYS_INLINE BufferBase() : m_pas() { /* ... */ }
|
||||
constexpr ALWAYS_INLINE BufferBase(const tipc::PointerAndSize &pas) : m_pas(pas) { /* ... */ }
|
||||
constexpr ALWAYS_INLINE BufferBase(uintptr_t ptr, size_t sz) : m_pas(ptr, sz) { /* ... */ }
|
||||
};
|
||||
|
||||
class InBufferBase : public BufferBase {
|
||||
|
@ -57,7 +57,7 @@ namespace ams::tipc {
|
|||
SfBufferAttr_In;
|
||||
public:
|
||||
constexpr ALWAYS_INLINE InBufferBase() : BaseType() { /* ... */ }
|
||||
constexpr ALWAYS_INLINE InBufferBase(const tipc::PointerAndSize &_pas) : BaseType(_pas) { /* ... */ }
|
||||
constexpr ALWAYS_INLINE InBufferBase(const tipc::PointerAndSize &pas) : BaseType(pas) { /* ... */ }
|
||||
constexpr ALWAYS_INLINE InBufferBase(uintptr_t ptr, size_t sz) : BaseType(ptr, sz) { /* ... */ }
|
||||
|
||||
constexpr ALWAYS_INLINE InBufferBase(const void *ptr, size_t sz) : BaseType(reinterpret_cast<uintptr_t>(ptr), sz) { /* ... */ }
|
||||
|
@ -71,7 +71,7 @@ namespace ams::tipc {
|
|||
SfBufferAttr_Out;
|
||||
public:
|
||||
constexpr ALWAYS_INLINE OutBufferBase() : BaseType() { /* ... */ }
|
||||
constexpr ALWAYS_INLINE OutBufferBase(const tipc::PointerAndSize &_pas) : BaseType(_pas) { /* ... */ }
|
||||
constexpr ALWAYS_INLINE OutBufferBase(const tipc::PointerAndSize &pas) : BaseType(pas) { /* ... */ }
|
||||
constexpr ALWAYS_INLINE OutBufferBase(uintptr_t ptr, size_t sz) : BaseType(ptr, sz) { /* ... */ }
|
||||
|
||||
constexpr ALWAYS_INLINE OutBufferBase(void *ptr, size_t sz) : BaseType(reinterpret_cast<uintptr_t>(ptr), sz) { /* ... */ }
|
||||
|
@ -86,7 +86,7 @@ namespace ams::tipc {
|
|||
ExtraAttributes;
|
||||
public:
|
||||
constexpr ALWAYS_INLINE InBufferImpl() : BaseType() { /* ... */ }
|
||||
constexpr ALWAYS_INLINE InBufferImpl(const tipc::PointerAndSize &_pas) : BaseType(_pas) { /* ... */ }
|
||||
constexpr ALWAYS_INLINE InBufferImpl(const tipc::PointerAndSize &pas) : BaseType(pas) { /* ... */ }
|
||||
constexpr ALWAYS_INLINE InBufferImpl(uintptr_t ptr, size_t sz) : BaseType(ptr, sz) { /* ... */ }
|
||||
|
||||
constexpr ALWAYS_INLINE InBufferImpl(const void *ptr, size_t sz) : BaseType(reinterpret_cast<uintptr_t>(ptr), sz) { /* ... */ }
|
||||
|
@ -109,7 +109,7 @@ namespace ams::tipc {
|
|||
ExtraAttributes;
|
||||
public:
|
||||
constexpr ALWAYS_INLINE OutBufferImpl() : BaseType() { /* ... */ }
|
||||
constexpr ALWAYS_INLINE OutBufferImpl(const tipc::PointerAndSize &_pas) : BaseType(_pas) { /* ... */ }
|
||||
constexpr ALWAYS_INLINE OutBufferImpl(const tipc::PointerAndSize &pas) : BaseType(pas) { /* ... */ }
|
||||
constexpr ALWAYS_INLINE OutBufferImpl(uintptr_t ptr, size_t sz) : BaseType(ptr, sz) { /* ... */ }
|
||||
|
||||
constexpr ALWAYS_INLINE OutBufferImpl(void *ptr, size_t sz) : BaseType(reinterpret_cast<uintptr_t>(ptr), sz) { /* ... */ }
|
||||
|
@ -131,7 +131,7 @@ namespace ams::tipc {
|
|||
static constexpr u32 AdditionalAttributes = BaseType::AdditionalAttributes;
|
||||
public:
|
||||
constexpr ALWAYS_INLINE InArrayImpl() : BaseType() { /* ... */ }
|
||||
constexpr ALWAYS_INLINE InArrayImpl(const tipc::PointerAndSize &_pas) : BaseType(_pas) { /* ... */ }
|
||||
constexpr ALWAYS_INLINE InArrayImpl(const tipc::PointerAndSize &pas) : BaseType(pas) { /* ... */ }
|
||||
constexpr ALWAYS_INLINE InArrayImpl(uintptr_t ptr, size_t sz) : BaseType(ptr, sz) { /* ... */ }
|
||||
|
||||
constexpr ALWAYS_INLINE InArrayImpl(const T *ptr, size_t num_elements) : BaseType(reinterpret_cast<uintptr_t>(ptr), num_elements * sizeof(T)) { /* ... */ }
|
||||
|
@ -164,7 +164,7 @@ namespace ams::tipc {
|
|||
static constexpr u32 AdditionalAttributes = BaseType::AdditionalAttributes;
|
||||
public:
|
||||
constexpr ALWAYS_INLINE OutArrayImpl() : BaseType() { /* ... */ }
|
||||
constexpr ALWAYS_INLINE OutArrayImpl(const tipc::PointerAndSize &_pas) : BaseType(_pas) { /* ... */ }
|
||||
constexpr ALWAYS_INLINE OutArrayImpl(const tipc::PointerAndSize &pas) : BaseType(pas) { /* ... */ }
|
||||
constexpr ALWAYS_INLINE OutArrayImpl(uintptr_t ptr, size_t sz) : BaseType(ptr, sz) { /* ... */ }
|
||||
|
||||
constexpr ALWAYS_INLINE OutArrayImpl(T *ptr, size_t num_elements) : BaseType(reinterpret_cast<uintptr_t>(ptr), num_elements * sizeof(T)) { /* ... */ }
|
||||
|
|
|
@ -44,36 +44,36 @@ namespace ams::tipc {
|
|||
class OutHandleImpl : public OutHandleTag {
|
||||
static_assert(std::is_base_of<InHandleTag, T>::value, "OutHandleImpl requires InHandle base");
|
||||
private:
|
||||
T *ptr;
|
||||
T *m_ptr;
|
||||
public:
|
||||
constexpr OutHandleImpl(T *p) : ptr(p) { /* ... */ }
|
||||
constexpr OutHandleImpl(T *p) : m_ptr(p) { /* ... */ }
|
||||
|
||||
constexpr void SetValue(const os::NativeHandle &value) {
|
||||
*this->ptr = value;
|
||||
*m_ptr = value;
|
||||
}
|
||||
|
||||
constexpr void SetValue(const T &value) {
|
||||
*this->ptr = value;
|
||||
*m_ptr = value;
|
||||
}
|
||||
|
||||
constexpr const T &GetValue() const {
|
||||
return *this->ptr;
|
||||
return *m_ptr;
|
||||
}
|
||||
|
||||
constexpr T *GetPointer() const {
|
||||
return this->ptr;
|
||||
return m_ptr;
|
||||
}
|
||||
|
||||
constexpr os::NativeHandle *GetHandlePointer() const {
|
||||
return &this->ptr->handle;
|
||||
return &m_ptr->handle;
|
||||
}
|
||||
|
||||
constexpr T &operator *() const {
|
||||
return *this->ptr;
|
||||
return *m_ptr;
|
||||
}
|
||||
|
||||
constexpr T *operator ->() const {
|
||||
return this->ptr;
|
||||
return m_ptr;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -20,23 +20,23 @@ namespace ams::tipc {
|
|||
|
||||
class PointerAndSize {
|
||||
private:
|
||||
uintptr_t pointer;
|
||||
size_t size;
|
||||
uintptr_t m_pointer;
|
||||
size_t m_size;
|
||||
public:
|
||||
constexpr PointerAndSize() : pointer(0), size(0) { /* ... */ }
|
||||
constexpr PointerAndSize(uintptr_t ptr, size_t sz) : pointer(ptr), size(sz) { /* ... */ }
|
||||
constexpr PointerAndSize() : m_pointer(0), m_size(0) { /* ... */ }
|
||||
constexpr PointerAndSize(uintptr_t ptr, size_t sz) : m_pointer(ptr), m_size(sz) { /* ... */ }
|
||||
constexpr PointerAndSize(void *ptr, size_t sz) : PointerAndSize(reinterpret_cast<uintptr_t>(ptr), sz) { /* ... */ }
|
||||
|
||||
constexpr ALWAYS_INLINE void *GetPointer() const {
|
||||
return reinterpret_cast<void *>(this->pointer);
|
||||
return reinterpret_cast<void *>(m_pointer);
|
||||
}
|
||||
|
||||
constexpr ALWAYS_INLINE uintptr_t GetAddress() const {
|
||||
return this->pointer;
|
||||
return m_pointer;
|
||||
}
|
||||
|
||||
constexpr ALWAYS_INLINE size_t GetSize() const {
|
||||
return this->size;
|
||||
return m_size;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -143,7 +143,7 @@ namespace ams::tipc {
|
|||
|
||||
void RegisterPort(s32 index, os::NativeHandle port_handle) {
|
||||
/* Set our port number. */
|
||||
this->m_port_number = index;
|
||||
m_port_number = index;
|
||||
|
||||
/* Create an object holder for the port. */
|
||||
tipc::ObjectHolder object;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue