[ox/preloader] Cleanup NativePlatSpec
This commit is contained in:
parent
b58431c09a
commit
21131a35a3
5
deps/ox/src/ox/preloader/platspecs.hpp
vendored
5
deps/ox/src/ox/preloader/platspecs.hpp
vendored
@ -16,16 +16,13 @@ struct NativePlatSpec {
|
|||||||
using PtrType = uintptr_t;
|
using PtrType = uintptr_t;
|
||||||
using size_t = std::size_t;
|
using size_t = std::size_t;
|
||||||
|
|
||||||
static constexpr auto PtrAlign = alignof(void*);
|
|
||||||
static constexpr PtrType RomStart = 0x08000000;
|
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
[[nodiscard]]
|
[[nodiscard]]
|
||||||
static constexpr std::size_t alignOf(const T &v) noexcept {
|
static constexpr std::size_t alignOf(const T &v) noexcept {
|
||||||
if constexpr(ox::is_integral_v<T>) {
|
if constexpr(ox::is_integral_v<T>) {
|
||||||
return alignof(T);
|
return alignof(T);
|
||||||
} else if constexpr(ox::is_pointer_v<T>) {
|
} else if constexpr(ox::is_pointer_v<T>) {
|
||||||
PtrType p = 0;
|
const PtrType p = 0;
|
||||||
return alignOf(p);
|
return alignOf(p);
|
||||||
} else {
|
} else {
|
||||||
AlignmentCatcher<NativePlatSpec> c;
|
AlignmentCatcher<NativePlatSpec> c;
|
||||||
|
Loading…
Reference in New Issue
Block a user