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 {
45
45
class LayoutOptions ;
46
46
enum class Anchor ;
47
47
48
- template <typename T>
48
+ template <typename T, typename >
49
49
struct CCArrayExtCheck {
50
50
using type = void ;
51
51
};
@@ -644,12 +644,12 @@ class CC_DLL CCNode : public CCObject
644
644
* Like `getChildren()`, but returns a `CCArrayExt<CCNode>` instead.
645
645
* You must include `<Geode/utils/cocos.hpp>` to use this, otherwise it won't compile
646
646
*/
647
- template <typename PleaseDontChangeMe = CCNode>
647
+ template <typename T = CCNode, typename PleaseDontChangeMe = void >
648
648
inline auto getChildrenExt () {
649
649
// CCArrayExt is defined in geode/utils/cocos.hpp, which we cannot include due to circular includes.
650
650
// This is an incredibly hacky way to still be able to use the type
651
651
652
- using CCArrayExt = geode::CCArrayExtCheck<PleaseDontChangeMe>::type;
652
+ using CCArrayExt = geode::CCArrayExtCheck<T, PleaseDontChangeMe>::type;
653
653
static_assert (!std::is_void_v<CCArrayExt>, " Please include <Geode/utils/cocos.hpp> to use getChildrenExt()" );
654
654
655
655
return CCArrayExt (getChildren ());
Original file line number Diff line number Diff line change @@ -1643,7 +1643,7 @@ namespace geode::cocos {
1643
1643
void GEODE_DLL handleTouchPriority (cocos2d::CCNode* node, bool force = false );
1644
1644
}
1645
1645
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 >;
1649
1649
};
You can’t perform that action at this time.
0 commit comments