Move getFieldIndexForClass outside of header

This commit is contained in:
alk 2022-12-03 16:49:48 +03:00 committed by GitHub
parent 51109919f9
commit eadb1b14bd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -47,11 +47,8 @@ namespace geode::modifier {
// Padding used for guaranteeing any member of parents // Padding used for guaranteeing any member of parents
// will be in between sizeof(Intermediate) and sizeof(Parent) // will be in between sizeof(Intermediate) and sizeof(Parent)
uintptr_t m_padding; uintptr_t m_padding;
static inline std::unordered_map<size_t, size_t> nextIndex;
static size_t getFieldIndexForClass(size_t hash) { GEODE_DLL static size_t getFieldIndexForClass(size_t hash);
return nextIndex[hash]++;
}
public: public:
static void fieldConstructor(void* offsetField) { static void fieldConstructor(void* offsetField) {