mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2024-11-23 04:12:02 +00:00
kern: fix some lingering non-m_ member variables
This commit is contained in:
parent
67a45c97ef
commit
179d91a563
3 changed files with 28 additions and 28 deletions
|
@ -54,63 +54,63 @@ namespace ams::kern::init::Elf::Elf64 {
|
|||
|
||||
class Dyn {
|
||||
private:
|
||||
SXword tag;
|
||||
SXword m_tag;
|
||||
union {
|
||||
Xword value;
|
||||
Addr ptr;
|
||||
Xword m_value;
|
||||
Addr m_ptr;
|
||||
};
|
||||
public:
|
||||
constexpr ALWAYS_INLINE SXword GetTag() const {
|
||||
return this->tag;
|
||||
return m_tag;
|
||||
}
|
||||
|
||||
constexpr ALWAYS_INLINE Xword GetValue() const {
|
||||
return this->value;
|
||||
return m_value;
|
||||
}
|
||||
|
||||
constexpr ALWAYS_INLINE Addr GetPtr() const {
|
||||
return this->ptr;
|
||||
return m_ptr;
|
||||
}
|
||||
};
|
||||
|
||||
class Rel {
|
||||
private:
|
||||
Addr offset;
|
||||
Xword info;
|
||||
Addr m_offset;
|
||||
Xword m_info;
|
||||
public:
|
||||
constexpr ALWAYS_INLINE Addr GetOffset() const {
|
||||
return this->offset;
|
||||
return m_offset;
|
||||
}
|
||||
|
||||
constexpr ALWAYS_INLINE Xword GetSym() const {
|
||||
return this->info >> 32;
|
||||
return m_info >> 32;
|
||||
}
|
||||
|
||||
constexpr ALWAYS_INLINE Xword GetType() const {
|
||||
return this->info & 0xFFFFFFFF;
|
||||
return m_info & 0xFFFFFFFF;
|
||||
}
|
||||
};
|
||||
|
||||
class Rela {
|
||||
private:
|
||||
Addr offset;
|
||||
Xword info;
|
||||
SXword addend;
|
||||
Addr m_offset;
|
||||
Xword m_info;
|
||||
SXword m_addend;
|
||||
public:
|
||||
constexpr ALWAYS_INLINE Addr GetOffset() const {
|
||||
return this->offset;
|
||||
return m_offset;
|
||||
}
|
||||
|
||||
constexpr ALWAYS_INLINE Xword GetSym() const {
|
||||
return this->info >> 32;
|
||||
return m_info >> 32;
|
||||
}
|
||||
|
||||
constexpr ALWAYS_INLINE Xword GetType() const {
|
||||
return this->info & 0xFFFFFFFF;
|
||||
return m_info & 0xFFFFFFFF;
|
||||
}
|
||||
|
||||
constexpr ALWAYS_INLINE SXword GetAddend() const {
|
||||
return this->addend;
|
||||
return m_addend;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -140,21 +140,21 @@ namespace ams::kern::svc {
|
|||
using CT = const char;
|
||||
using T = char;
|
||||
private:
|
||||
const char *ptr;
|
||||
const char *m_ptr;
|
||||
protected:
|
||||
ALWAYS_INLINE Result CopyStringTo(char *dst, size_t size) const {
|
||||
static_assert(sizeof(char) == 1);
|
||||
R_UNLESS(UserspaceAccess::CopyStringFromUser(dst, this->ptr, size) > 0, svc::ResultInvalidPointer());
|
||||
R_UNLESS(UserspaceAccess::CopyStringFromUser(dst, m_ptr, size) > 0, svc::ResultInvalidPointer());
|
||||
return ResultSuccess();
|
||||
}
|
||||
|
||||
ALWAYS_INLINE Result CopyArrayElementTo(char *dst, size_t index) const {
|
||||
return Traits::CopyFromUserspace(dst, this->ptr + index, sizeof(*dst));
|
||||
return Traits::CopyFromUserspace(dst, m_ptr + index, sizeof(*dst));
|
||||
}
|
||||
|
||||
constexpr ALWAYS_INLINE bool IsNull() const { return this->ptr == nullptr; }
|
||||
constexpr ALWAYS_INLINE bool IsNull() const { return m_ptr == nullptr; }
|
||||
|
||||
constexpr ALWAYS_INLINE const char *GetUnsafePointer() const { return this->ptr; }
|
||||
constexpr ALWAYS_INLINE const char *GetUnsafePointer() const { return m_ptr; }
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -25,18 +25,18 @@ namespace ams::kern {
|
|||
public:
|
||||
static constexpr size_t MaxMemoryRegions = 200;
|
||||
private:
|
||||
KMemoryRegion region_heap[MaxMemoryRegions];
|
||||
size_t num_regions;
|
||||
KMemoryRegion m_region_heap[MaxMemoryRegions];
|
||||
size_t m_num_regions;
|
||||
public:
|
||||
constexpr ALWAYS_INLINE KMemoryRegionAllocator() : region_heap(), num_regions() { /* ... */ }
|
||||
constexpr ALWAYS_INLINE KMemoryRegionAllocator() : m_region_heap(), m_num_regions() { /* ... */ }
|
||||
public:
|
||||
template<typename... Args>
|
||||
ALWAYS_INLINE KMemoryRegion *Allocate(Args&&... args) {
|
||||
/* Ensure we stay within the bounds of our heap. */
|
||||
MESOSPHERE_INIT_ABORT_UNLESS(this->num_regions < MaxMemoryRegions);
|
||||
MESOSPHERE_INIT_ABORT_UNLESS(m_num_regions < MaxMemoryRegions);
|
||||
|
||||
/* Create the new region. */
|
||||
KMemoryRegion *region = std::addressof(this->region_heap[this->num_regions++]);
|
||||
KMemoryRegion *region = std::addressof(m_region_heap[m_num_regions++]);
|
||||
std::construct_at(region, std::forward<Args>(args)...);
|
||||
|
||||
return region;
|
||||
|
|
Loading…
Reference in a new issue