[ox/preloader] Cleanup NativePlatSpec

This commit is contained in:
Gary Talent 2023-03-11 16:56:44 -06:00
parent b58431c09a
commit 21131a35a3

View File

@ -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;