Skip to content

Commit

Permalink
Use std::bit_cast + remove const return
Browse files Browse the repository at this point in the history
  • Loading branch information
wopss committed Dec 16, 2024
1 parent e0b9e11 commit 69d089f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions include/RED4ext/Relocation-inl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ uintptr_t RED4ext::UniversalRelocBase::Resolve(uint32_t aHash)
}
}

RED4EXT_INLINE const HMODULE RED4ext::UniversalRelocBase::GetRED4extModule()
RED4EXT_INLINE HMODULE RED4ext::UniversalRelocBase::GetRED4extModule()
{
static constexpr auto moduleName = L"RED4ext.dll";

Expand All @@ -64,7 +64,7 @@ RED4EXT_INLINE const HMODULE RED4ext::UniversalRelocBase::GetRED4extModule()
return handle;
}

RED4EXT_INLINE const RED4ext::UniversalRelocBase::ResolveFunc_t RED4ext::UniversalRelocBase::
RED4EXT_INLINE RED4ext::UniversalRelocBase::ResolveFunc_t RED4ext::UniversalRelocBase::
InitializeAddressResolverFunction()
{
static constexpr auto procName = "RED4ext_ResolveAddress";
Expand Down
12 changes: 6 additions & 6 deletions include/RED4ext/Relocation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,15 +95,15 @@ class UniversalRelocBase
using QueryFunc_t = void (*)(PluginInfo*);
using ResolveFunc_t = std::uintptr_t (*)(std::uint32_t);

static const HMODULE GetRED4extModule();
static HMODULE GetRED4extModule();

static const ResolveFunc_t InitializeAddressResolverFunction();
static const ResolveFunc_t GetAddressResolverFunction();
static ResolveFunc_t InitializeAddressResolverFunction();
static ResolveFunc_t GetAddressResolverFunction();

static const HMODULE GetCurrentModuleHandle();
static const std::filesystem::path GetCurrentModulePath();
static HMODULE GetCurrentModuleHandle();
static std::filesystem::path GetCurrentModulePath();

static const QueryFunc_t GetCurrentPluginQueryFunction();
static QueryFunc_t GetCurrentPluginQueryFunction();
static bool QueryCurrentPlugin(PluginInfo& aPluginInfo);

static void ShowErrorAndTerminateProcess(std::wstring_view aMsg, std::uint32_t aLastError,
Expand Down

0 comments on commit 69d089f

Please sign in to comment.