From 85ef6b3b98523b6e7e79521a36a3e63a28c81896 Mon Sep 17 00:00:00 2001 From: James Chen Date: Tue, 9 Jul 2013 10:18:15 +0800 Subject: [PATCH] closed #2384: Using static_cast instead of C cast in ExtensionsTest.cpp. --- samples/Cpp/TestCpp/Classes/ExtensionsTest/ExtensionsTest.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/Cpp/TestCpp/Classes/ExtensionsTest/ExtensionsTest.cpp b/samples/Cpp/TestCpp/Classes/ExtensionsTest/ExtensionsTest.cpp index 466a4c4a62..c13a6a59b3 100644 --- a/samples/Cpp/TestCpp/Classes/ExtensionsTest/ExtensionsTest.cpp +++ b/samples/Cpp/TestCpp/Classes/ExtensionsTest/ExtensionsTest.cpp @@ -99,14 +99,14 @@ void ExtensionsMainLayer::onEnter() void ExtensionsMainLayer::ccTouchesBegan(Set *pTouches, Event *pEvent) { - Touch* touch = (Touch*)pTouches->anyObject(); + Touch* touch = static_cast(pTouches->anyObject()); _beginPos = touch->getLocation(); } void ExtensionsMainLayer::ccTouchesMoved(Set *pTouches, Event *pEvent) { - Touch* touch = (Touch*)pTouches->anyObject(); + Touch* touch = static_cast(pTouches->anyObject()); Point touchLocation = touch->getLocation(); float nMoveY = touchLocation.y - _beginPos.y;