From cf4f058945b79f5fa2ea9a97dcf04af6d33ab408 Mon Sep 17 00:00:00 2001 From: alk <45172705+altalk23@users.noreply.github.com> Date: Sat, 3 Dec 2022 16:51:46 +0300 Subject: [PATCH] Move getFieldIndexForClass to source --- loader/src/hooks/GeodeNodeMetadata.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/loader/src/hooks/GeodeNodeMetadata.cpp b/loader/src/hooks/GeodeNodeMetadata.cpp index 70a0f1a8..935aa057 100644 --- a/loader/src/hooks/GeodeNodeMetadata.cpp +++ b/loader/src/hooks/GeodeNodeMetadata.cpp @@ -64,7 +64,6 @@ public: }; // proxy forwards -// clang-format off #include struct ProxyCCNode : Modify { virtual CCObject* getUserObject() { @@ -80,7 +79,10 @@ struct ProxyCCNode : Modify { } }; -// clang-format on +static inline std::unordered_map s_nextIndex; +size_t FieldIntermediate::getFieldIndexForClass(size_t hash) { + return s_nextIndex[hash]++; +} // not const because might modify contents FieldContainer* CCNode::getFieldContainer() {