Skip to content

Commit 0e61ad1

Browse files
committed
add variadic ccspawn::create
1 parent 51d59fe commit 0e61ad1

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

bindings/2.208/inline/CCSpawn.cpp

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,6 @@
77
#endif
88

99
#if defined(GEODE_IS_IOS)
10-
cocos2d::CCSpawn* cocos2d::CCSpawn::create(cocos2d::CCFiniteTimeAction* first, ...) {
11-
va_list args;
12-
va_start(args, first);
13-
auto* array = cocos2d::CCArray::create();
14-
array->addObject(first);
15-
while (auto* action = va_arg(args, cocos2d::CCFiniteTimeAction*)) {
16-
array->addObject(action);
17-
}
18-
va_end(args);
19-
return cocos2d::CCSpawn::create(array);
20-
}
21-
2210
cocos2d::CCSpawn* cocos2d::CCSpawn::create(cocos2d::CCArray* arrayOfActions) {
2311
CCSpawn* pRet = NULL;
2412
do
@@ -50,3 +38,16 @@ cocos2d::CCSpawn* cocos2d::CCSpawn::create(cocos2d::CCArray* arrayOfActions) {
5038
}
5139
#endif
5240

41+
#ifndef GEODE_IS_ANDROID
42+
cocos2d::CCSpawn* cocos2d::CCSpawn::create(cocos2d::CCFiniteTimeAction* first, ...) {
43+
va_list args;
44+
va_start(args, first);
45+
auto* array = cocos2d::CCArray::create();
46+
array->addObject(first);
47+
while (auto* action = va_arg(args, cocos2d::CCFiniteTimeAction*)) {
48+
array->addObject(action);
49+
}
50+
va_end(args);
51+
return cocos2d::CCSpawn::create(array);
52+
}
53+
#endif

0 commit comments

Comments
 (0)