mirror of
https://github.com/geode-sdk/geode.git
synced 2024-11-23 07:57:51 -05:00
remove use of union_cast
This commit is contained in:
parent
e2548ab4af
commit
e65f1184e7
1 changed files with 2 additions and 3 deletions
|
@ -10,7 +10,6 @@
|
|||
#include <cstdlib>
|
||||
#include <stddef.h>
|
||||
#include <type_traits>
|
||||
#include <Geode/loader/Log.hpp>
|
||||
|
||||
namespace geode::addresser {
|
||||
|
||||
|
@ -202,7 +201,7 @@ namespace geode::addresser {
|
|||
// do NOT delete the line below.
|
||||
// doing so breaks thunk adjusting on windows.
|
||||
// why? bruh idk
|
||||
auto _ = *union_cast<ptrdiff_t*>(&func);
|
||||
auto _ = *(ptrdiff_t*)(&func);
|
||||
return (F)((intptr_t)self + Addresser::thunkOf(func));
|
||||
}
|
||||
|
||||
|
@ -211,7 +210,7 @@ namespace geode::addresser {
|
|||
// do NOT delete the line below.
|
||||
// doing so breaks thunk adjusting on windows.
|
||||
// why? bruh idk
|
||||
auto _ = *union_cast<ptrdiff_t*>(&func);
|
||||
auto _ = *(ptrdiff_t*)(&func);
|
||||
return (F)((intptr_t)self - Addresser::thunkOf(func));
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue