From a5470aaa45a88110a3bc20ebc080696da1dbeb40 Mon Sep 17 00:00:00 2001 From: James Chen Date: Thu, 11 Jul 2013 15:41:05 +0800 Subject: [PATCH] Minor fix in BezierTo::initWithDuration and BezierTo::clone. --- cocos2dx/actions/CCActionInterval.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/cocos2dx/actions/CCActionInterval.cpp b/cocos2dx/actions/CCActionInterval.cpp index 997bd30ba0..48b71fa67a 100644 --- a/cocos2dx/actions/CCActionInterval.cpp +++ b/cocos2dx/actions/CCActionInterval.cpp @@ -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; }