Minor fix in BezierTo::initWithDuration and BezierTo::clone.

This commit is contained in:
James Chen 2013-07-11 15:41:05 +08:00
parent f414803e92
commit a5470aaa45
1 changed files with 3 additions and 4 deletions

View File

@ -1380,21 +1380,20 @@ BezierTo* BezierTo::create(float t, const ccBezierConfig& c)
bool BezierTo::initWithDuration(float t, const ccBezierConfig &c)
{
bool bRet = false;
if (ActionInterval::initWithDuration(t))
{
_toConfig = c;
return true;
}
return bRet;
return false;
}
BezierTo* BezierTo::clone(void) const
{
// no copy constructor
auto a = new BezierTo();
a->initWithDuration(_duration, _config);
a->initWithDuration(_duration, _toConfig);
a->autorelease();
return a;
}