mirror of https://github.com/axmolengine/axmol.git
closed #2384: Using static_cast instead of C cast in ExtensionsTest.cpp.
This commit is contained in:
parent
3c394bba87
commit
85ef6b3b98
|
@ -99,14 +99,14 @@ void ExtensionsMainLayer::onEnter()
|
|||
|
||||
void ExtensionsMainLayer::ccTouchesBegan(Set *pTouches, Event *pEvent)
|
||||
{
|
||||
Touch* touch = (Touch*)pTouches->anyObject();
|
||||
Touch* touch = static_cast<Touch*>(pTouches->anyObject());
|
||||
|
||||
_beginPos = touch->getLocation();
|
||||
}
|
||||
|
||||
void ExtensionsMainLayer::ccTouchesMoved(Set *pTouches, Event *pEvent)
|
||||
{
|
||||
Touch* touch = (Touch*)pTouches->anyObject();
|
||||
Touch* touch = static_cast<Touch*>(pTouches->anyObject());
|
||||
|
||||
Point touchLocation = touch->getLocation();
|
||||
float nMoveY = touchLocation.y - _beginPos.y;
|
||||
|
|
Loading…
Reference in New Issue