We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7586dd9 commit d60af4eCopy full SHA for d60af4e
include/Utils.h
@@ -101,14 +101,14 @@ namespace AlphaUtils {
101
}
102
103
template <typename Layer>
104
- static inline std::optional<cocos2d::CCNode*> getLayer() {
+ static inline std::optional<Layer> getLayer() {
105
106
auto scene = cocos2d::CCDirector::sharedDirector()->getRunningScene();
107
if (cocos2d::CCTransitionScene* trans = geode::cast::typeinfo_cast<cocos2d::CCTransitionScene*>(scene)) {
108
scene = public_cast(trans, m_pInScene);
109
110
if (scene) {
111
- if (cocos2d::CCNode* node = scene->getChildByType<Layer>(0)) {
+ if (Layer node = scene->getChildByType<Layer>(0)) {
112
return node;
113
114
0 commit comments