File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ namespace geode {
4545 class LayoutOptions ;
4646 enum class Anchor ;
4747
48- template <typename T>
48+ template <typename T, typename >
4949 struct CCArrayExtCheck {
5050 using type = void ;
5151 };
@@ -644,12 +644,12 @@ class CC_DLL CCNode : public CCObject
644644 * Like `getChildren()`, but returns a `CCArrayExt<CCNode>` instead.
645645 * You must include `<Geode/utils/cocos.hpp>` to use this, otherwise it won't compile
646646 */
647- template <typename PleaseDontChangeMe = CCNode>
647+ template <typename T = CCNode, typename PleaseDontChangeMe = void >
648648 inline auto getChildrenExt () {
649649 // CCArrayExt is defined in geode/utils/cocos.hpp, which we cannot include due to circular includes.
650650 // This is an incredibly hacky way to still be able to use the type
651651
652- using CCArrayExt = geode::CCArrayExtCheck<PleaseDontChangeMe>::type;
652+ using CCArrayExt = geode::CCArrayExtCheck<T, PleaseDontChangeMe>::type;
653653 static_assert (!std::is_void_v<CCArrayExt>, " Please include <Geode/utils/cocos.hpp> to use getChildrenExt()" );
654654
655655 return CCArrayExt (getChildren ());
Original file line number Diff line number Diff line change @@ -1643,7 +1643,7 @@ namespace geode::cocos {
16431643 void GEODE_DLL handleTouchPriority (cocos2d::CCNode* node, bool force = false );
16441644}
16451645
1646- template <>
1647- struct ::geode::CCArrayExtCheck<cocos2d::CCNode > {
1648- using type = cocos::CCArrayExt<cocos2d::CCNode >;
1646+ template <typename T >
1647+ struct ::geode::CCArrayExtCheck<T, void > {
1648+ using type = cocos::CCArrayExt<T >;
16491649};
You can’t perform that action at this time.
0 commit comments