Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:LiteLDev/LeviLamina into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
OEOTYAN committed Nov 3, 2023
2 parents b912b70 + cb3ed92 commit eb9cb0a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ll/api/memory/Memory.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ LLNDAPI std::vector<std::string> lookupSymbol(FuncPtr func);
LLAPI void modify(void* ptr, size_t len, const std::function<void()>& callback);

template <class T>
inline void modify(T& ref, std::remove_cvref_t<T>&& to) {
modify((void*)std::addressof(ref), sizeof(ref), [&ref, t = std::forward<T>(to)] {
(std::remove_cvref_t<T>&)(ref) = std::forward<T>(t);
inline void modify(T& ref, std::function<void(std::remove_cvref_t<T>&)>&& f) {
modify((void*)std::addressof(ref), sizeof(T), [&] {
f((std::remove_cvref_t<T>&)(ref));
});
}

Expand Down

0 comments on commit eb9cb0a

Please sign in to comment.