From 8ff088da53f45ce8e3544aa83b0eacf8a24e3deb Mon Sep 17 00:00:00 2001 From: yinkaile <501251991@qq.com> Date: Sat, 8 Jun 2013 12:14:43 +0800 Subject: [PATCH] Standardize code --- .../Classes/ExtensionsTest/ArmatureTest/ArmatureScene.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/samples/Cpp/TestCpp/Classes/ExtensionsTest/ArmatureTest/ArmatureScene.cpp b/samples/Cpp/TestCpp/Classes/ExtensionsTest/ArmatureTest/ArmatureScene.cpp index 550862db72..fc56c9d480 100644 --- a/samples/Cpp/TestCpp/Classes/ExtensionsTest/ArmatureTest/ArmatureScene.cpp +++ b/samples/Cpp/TestCpp/Classes/ExtensionsTest/ArmatureTest/ArmatureScene.cpp @@ -309,7 +309,8 @@ std::string TestPerformance::subtitle() } void TestPerformance::addArmature(cocos2d::extension::CCArmature *armature) { - addChild(armature, armatureCount++); + armatureCount++; + addChild(armature, armatureCount); } void TestPerformance::update(float delta) { @@ -479,7 +480,8 @@ std::string TestParticleDisplay::subtitle() } bool TestParticleDisplay::ccTouchBegan(CCTouch *pTouch, CCEvent *pEvent) { - animationID = (++animationID) % armature->getAnimation()->getMovementCount(); + ++animationID; + animationID = animationID % armature->getAnimation()->getMovementCount(); armature->getAnimation()->playByIndex(animationID); return false; }