From aecd7cc1868b3498fb1f52eeb97c124af593a97d Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Tue, 9 Jan 2024 02:20:10 -0300 Subject: [PATCH] oops missed this one --- loader/include/Geode/utils/cocos.hpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/loader/include/Geode/utils/cocos.hpp b/loader/include/Geode/utils/cocos.hpp index 4add9cd3..c02e0fe1 100644 --- a/loader/include/Geode/utils/cocos.hpp +++ b/loader/include/Geode/utils/cocos.hpp @@ -1096,8 +1096,12 @@ namespace geode::cocos { return CCDictEntry(key, m_dict); } - size_t count(K key) { - return m_dict->allKeys(key)->count(); + bool contains(const Key& key) { + return m_dict->objectForKey(key) != nullptr; + } + + size_t count(const Key& key) { + return this->contains(key) ? 1 : 0; } }; }