From 9e0ccf96871eba3704f8314b9887c718e4e37ff3 Mon Sep 17 00:00:00 2001 From: shad0wshayd3 Date: Fri, 17 May 2024 14:01:50 +0000 Subject: [PATCH] maintenance --- CommonLibF4/include/REL/Relocation.h | 31 +++++++++------------------- 1 file changed, 10 insertions(+), 21 deletions(-) diff --git a/CommonLibF4/include/REL/Relocation.h b/CommonLibF4/include/REL/Relocation.h index dfac87cc..cd101359 100644 --- a/CommonLibF4/include/REL/Relocation.h +++ b/CommonLibF4/include/REL/Relocation.h @@ -263,8 +263,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)...); } @@ -279,58 +278,49 @@ namespace REL return stl::unrestricted_cast(_impl); } - 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 F4SE::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 F4SE::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 F4SE::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 F4SE::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(std::size_t a_idx, std::uintptr_t a_newFunc) - requires(std::same_as) + std::uintptr_t write_vfunc(std::size_t a_idx, std::uintptr_t a_newFunc) requires(std::same_as) { const auto addr = address() + (sizeof(void*) * a_idx); const auto result = *reinterpret_cast(addr); @@ -339,8 +329,7 @@ namespace REL } template - std::uintptr_t write_vfunc(std::size_t a_idx, F a_newFunc) - requires(std::same_as) + std::uintptr_t write_vfunc(std::size_t a_idx, F a_newFunc) requires(std::same_as) { return write_vfunc(a_idx, stl::unrestricted_cast(a_newFunc)); }