Skip to content
This repository was archived by the owner on Sep 16, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 4 additions & 10 deletions CommonLibSF/include/SFSE/Utilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace SFSE
{
SFSE::AllocTrampoline(14);
auto& trampoline = SFSE::GetTrampoline();
T::func = trampoline.write_call<Size>(a_address, T::Thunk);
T::func = trampoline.write_call<Size>(a_address, T::thunk);
}

template <class T, std::size_t Size = 5>
Expand All @@ -25,19 +25,13 @@ namespace SFSE
constexpr void write_vfunc(const REL::Offset a_offset) noexcept
{
REL::Relocation<std::uintptr_t> vtbl{ a_offset };
T::func = vtbl.write_vfunc(T::idx, T::Thunk);
T::func = vtbl.write_vfunc(T::idx, T::thunk);
}

template <class To, class From>
constexpr void write_vfunc(const std::size_t a_vtable_idx) noexcept
constexpr void write_vfunc(const std::size_t a_vtableIdx = 0) noexcept
{
write_vfunc<From>(To::VTABLE[a_vtable_idx]);
}

template <class To, class From>
constexpr void write_vfunc() noexcept
{
write_vfunc<From>(To::VTABLE[0]);
write_vfunc<From>(To::VTABLE[a_vtableIdx]);
}
} // namespace stl
} // namespace SFSE