mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-13 02:08:49 +12:00
Added .aligned() method for vm::ptr
Added set_alignment() macro for setting alignment Added alignof32() macro similar to sizeof32() Added CHECK_SIZE, CHECK_ALIGN macro with static_assert Minor refactoring
This commit is contained in:
parent
a7f77c27f7
commit
e896da8064
18 changed files with 1202 additions and 1237 deletions
|
@ -68,6 +68,16 @@ namespace vm
|
|||
return m_addr != 0;
|
||||
}
|
||||
|
||||
bool aligned() const
|
||||
{
|
||||
return m_addr % alignof32(T) == 0;
|
||||
}
|
||||
|
||||
bool operator %(to_ne_t<AT> alignment)
|
||||
{
|
||||
return m_addr % alignment != 0;
|
||||
}
|
||||
|
||||
_ptr_base& operator =(const _ptr_base&) = default;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue