Make the field fix only a minor change

This commit is contained in:
altalk23 2023-03-02 01:08:25 +03:00
parent 534b20d3df
commit ceeea0bd51
2 changed files with 6 additions and 0 deletions

View file

@ -49,6 +49,8 @@ namespace geode::modifier {
}
};
[[deprecated("Will be removed in 1.0.0")]]
GEODE_DLL size_t getFieldIndexForClass(size_t hash);
GEODE_DLL size_t getFieldIndexForClass(char const* name);
template <class Parent, class Base>

View file

@ -84,6 +84,10 @@ size_t modifier::getFieldIndexForClass(char const* name) {
return s_nextIndex[name]++;
}
size_t modifier::getFieldIndexForClass(size_t hash) {
return s_nextIndex[std::string(hash)]++;
}
// not const because might modify contents
FieldContainer* CCNode::getFieldContainer() {
return GeodeNodeMetadata::set(this)->getFieldContainer();