AccelDeccelAmplitude* AccelDeccelAmplitude::create(Action *action, float duration) { AccelDeccelAmplitude *ret = new (std::nothrow) AccelDeccelAmplitude(); if (ret && ret->initWithAction(action, duration)) { ret->autorelease(); return ret; } delete ret; return nullptr; }
AccelDeccelAmplitude* AccelDeccelAmplitude::create(Action *action, float duration) { AccelDeccelAmplitude *ret = new (std::nothrow) AccelDeccelAmplitude(); if (ret) { if (ret->initWithAction(action, duration)) { ret->autorelease(); } else { CC_SAFE_DELETE(ret); } } return ret; }