diff --git a/include/REL/Relocation.h b/include/REL/Relocation.h index 1b5aa5fde..8f07112bc 100644 --- a/include/REL/Relocation.h +++ b/include/REL/Relocation.h @@ -267,8 +267,7 @@ namespace REL template std::invoke_result_t operator()(Args&&... a_args) const - noexcept(std::is_nothrow_invocable_v) - requires(std::invocable) + noexcept(std::is_nothrow_invocable_v) requires(std::invocable) { return REL::invoke(get(), std::forward(a_args)...); } @@ -284,56 +283,48 @@ namespace REL } template - void write(const U& a_data) - requires(std::same_as) + void write(const U& a_data) requires(std::same_as) { safe_write(address(), std::addressof(a_data), sizeof(T)); } template - void write(const std::span a_data) - requires(std::same_as) + void write(const std::span a_data) requires(std::same_as) { safe_write(address(), a_data.data(), a_data.size_bytes()); } - + template - std::uintptr_t write_branch(const std::uintptr_t a_dst) - requires(std::same_as) + std::uintptr_t write_branch(const std::uintptr_t a_dst) requires(std::same_as) { return SKSE::GetTrampoline().write_branch(address(), a_dst); } template - std::uintptr_t write_branch(const F a_dst) - requires(std::same_as) + std::uintptr_t write_branch(const F a_dst) requires(std::same_as) { return SKSE::GetTrampoline().write_branch(address(), stl::unrestricted_cast(a_dst)); } template - std::uintptr_t write_call(const std::uintptr_t a_dst) - requires(std::same_as) + std::uintptr_t write_call(const std::uintptr_t a_dst) requires(std::same_as) { return SKSE::GetTrampoline().write_call(address(), a_dst); } template - std::uintptr_t write_call(const F a_dst) - requires(std::same_as) + std::uintptr_t write_call(const F a_dst) requires(std::same_as) { return SKSE::GetTrampoline().write_call(address(), stl::unrestricted_cast(a_dst)); } - void write_fill(const std::uint8_t a_value, const std::size_t a_count) - requires(std::same_as) + void write_fill(const std::uint8_t a_value, const std::size_t a_count) requires(std::same_as) { safe_fill(address(), a_value, a_count); } template - std::uintptr_t write_vfunc(const std::size_t a_idx, const std::uintptr_t a_newFunc) - requires(std::same_as) + std::uintptr_t write_vfunc(const std::size_t a_idx, const std::uintptr_t a_newFunc) requires(std::same_as) { const auto addr = address() + (sizeof(void*) * a_idx); const auto result = *reinterpret_cast(addr); @@ -342,8 +333,7 @@ namespace REL } template - std::uintptr_t write_vfunc(const std::size_t a_idx, const F a_newFunc) - requires(std::same_as) + std::uintptr_t write_vfunc(const std::size_t a_idx, const F a_newFunc) requires(std::same_as) { return write_vfunc(a_idx, stl::unrestricted_cast(a_newFunc)); } diff --git a/include/REL/Version.h b/include/REL/Version.h index d24462e5a..31fb4a29f 100644 --- a/include/REL/Version.h +++ b/include/REL/Version.h @@ -68,7 +68,7 @@ namespace REL return result; } - [[nodiscard]] static constexpr Version unpack(std::uint32_t a_packedVersion) noexcept + [[nodiscard]] static constexpr Version unpack(std::uint32_t a_packedVersion) noexcept { return REL::Version{ static_cast((a_packedVersion >> 24) & 0x0FF), diff --git a/src/SKSE/Trampoline.cpp b/src/SKSE/Trampoline.cpp index a6a8347e2..67ada4d5e 100644 --- a/src/SKSE/Trampoline.cpp +++ b/src/SKSE/Trampoline.cpp @@ -10,7 +10,7 @@ # undef max # undef MEM_COMMIT # undef MEM_FREE -# undef MEM_RELEASE +# undef MEM_RELEASE # undef MEM_RESERVE # undef PAGE_EXECUTE_READWRITE #endif