Little fix in CCDirector.cpp

Little fix in CCDirector.cpp
0.0 0


Hi, friends.
I got this error while compiling cocos latest gles20 git version with gcc 4.6.3 for android native.

/opt/cocos2d-x/cocos2dx/CCDirector.cpp: In member function ‘cocos2d::CCPoint cocos2d::CCDirector::convertToGL(const cocos2d::CCPoint&)’:
/opt/cocos2d-x/cocos2dx/CCDirector.cpp:461:96: error: narrowing conversion of ‘(((((double)uiPoint.cocos2d::CCPoint::x) * 2.0e+0) / ((double)glSize.cocos2d::CCSize::width)) - 1.0e+0)’ from ‘double’ to ‘float’ inside { } [-fpermissive]
/opt/cocos2d-x/cocos2dx/CCDirector.cpp:461:96: error: narrowing conversion of ‘(1.0e+0 - ((((double)uiPoint.cocos2d::CCPoint::y) * 2.0e+0) / ((double)glSize.cocos2d::CCSize::height)))’ from ‘double’ to ‘float’ inside { } [-fpermissive]
make: * [obj/local/armeabi/objs/cocos2dx_static/CCDirector.o] Error 1

Here is the code

kmVec3 clipCoord = {2.0*uiPoint.x/glSize.width - 1.0, 1.0 - 2.0*uiPoint.y/glSize.height, zClip};

Solution is simple, force to float. Oh GCC is too severe =)

kmVec3 clipCoord = {2.0f*uiPoint.x/glSize.width - 1.0f, 1.0f - 2.0f*uiPoint.y/glSize.height, zClip};

Please fix in future commits, to make code more compiler friendly.