mirror of https://github.com/axmolengine/axmol.git
'clone' method must invoke the inner object's clone method rather than its raw pointer.
This commit is contained in:
parent
5b8919829c
commit
0a31c7de3a
|
@ -148,7 +148,7 @@ CLASSNAME* CLASSNAME::create(cocos2d::ActionInterval *action) \
|
||||||
} \
|
} \
|
||||||
CLASSNAME* CLASSNAME::clone() const \
|
CLASSNAME* CLASSNAME::clone() const \
|
||||||
{ \
|
{ \
|
||||||
if(_inner) return CLASSNAME::create(_inner); \
|
if(_inner) return CLASSNAME::create(_inner->clone()); \
|
||||||
return nullptr; \
|
return nullptr; \
|
||||||
} \
|
} \
|
||||||
void CLASSNAME::update(float time) { \
|
void CLASSNAME::update(float time) { \
|
||||||
|
@ -205,7 +205,7 @@ CLASSNAME* CLASSNAME::create(cocos2d::ActionInterval *action, float rate) \
|
||||||
} \
|
} \
|
||||||
CLASSNAME* CLASSNAME::clone() const \
|
CLASSNAME* CLASSNAME::clone() const \
|
||||||
{ \
|
{ \
|
||||||
if(_inner) return CLASSNAME::create(_inner, _rate); \
|
if(_inner) return CLASSNAME::create(_inner->clone(), _rate); \
|
||||||
return nullptr; \
|
return nullptr; \
|
||||||
} \
|
} \
|
||||||
void CLASSNAME::update(float time) { \
|
void CLASSNAME::update(float time) { \
|
||||||
|
@ -254,7 +254,7 @@ CLASSNAME* CLASSNAME::create(cocos2d::ActionInterval *action, float period /* =
|
||||||
} \
|
} \
|
||||||
CLASSNAME* CLASSNAME::clone() const \
|
CLASSNAME* CLASSNAME::clone() const \
|
||||||
{ \
|
{ \
|
||||||
if(_inner) return CLASSNAME::create(_inner, _period); \
|
if(_inner) return CLASSNAME::create(_inner->clone(), _period); \
|
||||||
return nullptr; \
|
return nullptr; \
|
||||||
} \
|
} \
|
||||||
void CLASSNAME::update(float time) { \
|
void CLASSNAME::update(float time) { \
|
||||||
|
|
|
@ -130,9 +130,9 @@ CC_CONSTRUCTOR_ACCESS: \
|
||||||
CLASSNAME() { } \
|
CLASSNAME() { } \
|
||||||
public: \
|
public: \
|
||||||
static CLASSNAME* create(ActionInterval* action); \
|
static CLASSNAME* create(ActionInterval* action); \
|
||||||
CLASSNAME* clone() const override; \
|
virtual CLASSNAME* clone() const override; \
|
||||||
void update(float time) override; \
|
virtual void update(float time) override; \
|
||||||
ActionEase* reverse() const override; \
|
virtual ActionEase* reverse() const override; \
|
||||||
private: \
|
private: \
|
||||||
CC_DISALLOW_COPY_AND_ASSIGN(CLASSNAME); \
|
CC_DISALLOW_COPY_AND_ASSIGN(CLASSNAME); \
|
||||||
};
|
};
|
||||||
|
@ -379,9 +379,9 @@ CC_CONSTRUCTOR_ACCESS: \
|
||||||
CLASSNAME() { } \
|
CLASSNAME() { } \
|
||||||
public: \
|
public: \
|
||||||
static CLASSNAME* create(ActionInterval* action, float rate); \
|
static CLASSNAME* create(ActionInterval* action, float rate); \
|
||||||
CLASSNAME* clone() const override; \
|
virtual CLASSNAME* clone() const override; \
|
||||||
void update(float time) override; \
|
virtual void update(float time) override; \
|
||||||
EaseRateAction* reverse() const override; \
|
virtual EaseRateAction* reverse() const override; \
|
||||||
private: \
|
private: \
|
||||||
CC_DISALLOW_COPY_AND_ASSIGN(CLASSNAME); \
|
CC_DISALLOW_COPY_AND_ASSIGN(CLASSNAME); \
|
||||||
};
|
};
|
||||||
|
@ -466,9 +466,9 @@ CC_CONSTRUCTOR_ACCESS: \
|
||||||
CLASSNAME() { } \
|
CLASSNAME() { } \
|
||||||
public: \
|
public: \
|
||||||
static CLASSNAME* create(ActionInterval* action, float rate = 0.3f); \
|
static CLASSNAME* create(ActionInterval* action, float rate = 0.3f); \
|
||||||
CLASSNAME* clone() const override; \
|
virtual CLASSNAME* clone() const override; \
|
||||||
void update(float time) override; \
|
virtual void update(float time) override; \
|
||||||
EaseElastic* reverse() const override; \
|
virtual EaseElastic* reverse() const override; \
|
||||||
private: \
|
private: \
|
||||||
CC_DISALLOW_COPY_AND_ASSIGN(CLASSNAME); \
|
CC_DISALLOW_COPY_AND_ASSIGN(CLASSNAME); \
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue