Skip to content

Commit

Permalink
MemoryMgr.GTA: Simplify basic AddressByVersion usage
Browse files Browse the repository at this point in the history
  • Loading branch information
CookiePLMonster committed Oct 25, 2024
1 parent d70ae68 commit 0c6cb62
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions MemoryMgr.GTA.h
Original file line number Diff line number Diff line change
Expand Up @@ -373,39 +373,39 @@ namespace Memory

#if defined _GTA_III || defined _GTA_VC

template<typename T>
template<typename T = uintptr_t>
inline T AddressByVersion(uintptr_t address10, uintptr_t address11, uintptr_t addressSteam)
{
return T(Memory::internal::AddressByVersion( address10, address11, addressSteam ));
}

#elif defined _GTA_SA

template<typename T>
template<typename T = uintptr_t>
inline T AddressByVersion(Memory::AddrVariant address10, Memory::AddrVariant address11, Memory::AddrVariant addressSteam)
{
return T(Memory::internal::AddressByVersion( std::move(address10), std::move(address11), std::move(addressSteam), Memory::PatternAndOffset(std::string_view()) ));
}

template<typename T>
template<typename T = uintptr_t>
inline T AddressByVersion(Memory::AddrVariant address10, Memory::AddrVariant address11, Memory::AddrVariant addressSteam, Memory::PatternAndOffset patternNewExes)
{
return T(Memory::internal::AddressByVersion( std::move(address10), std::move(address11), std::move(addressSteam), std::move(patternNewExes) ));
}

template<typename T>
template<typename T = uintptr_t>
inline T AddressByVersion(Memory::AddrVariant address10, Memory::PatternAndOffset patternNewExes)
{
return T(Memory::internal::AddressByVersion( std::move(address10), 0, 0, std::move(patternNewExes) ));
}

template<typename T>
template<typename T = uintptr_t>
inline T AddressByRegion_10(uintptr_t address10)
{
return T(Memory::internal::AddressByRegion_10(address10));
}

template<typename T>
template<typename T = uintptr_t>
inline T AddressByRegion_11(uintptr_t address11)
{
return T(Memory::internal::AddressByRegion_11(address11));
Expand Down

0 comments on commit 0c6cb62

Please sign in to comment.