mirror of https://github.com/axmolengine/axmol.git
fix compilation warnings on android & ios
This commit is contained in:
parent
6b374881f0
commit
184b31efa3
|
@ -157,7 +157,7 @@ void CCTimer::update(ccTime dt)
|
|||
m_fElapsed += dt;
|
||||
if (m_fElapsed >= m_fInterval)
|
||||
{
|
||||
if (m_pTarget != NULL && m_pfnSelector != NULL)
|
||||
if (m_pTarget && m_pfnSelector)
|
||||
{
|
||||
(m_pTarget->*m_pfnSelector)(m_fElapsed);
|
||||
}
|
||||
|
@ -175,7 +175,7 @@ void CCTimer::update(ccTime dt)
|
|||
{
|
||||
if( m_fElapsed >= m_fDelay )
|
||||
{
|
||||
if (m_pTarget != NULL && m_pfnSelector != NULL)
|
||||
if (m_pTarget && m_pfnSelector)
|
||||
{
|
||||
(m_pTarget->*m_pfnSelector)(m_fElapsed);
|
||||
}
|
||||
|
@ -192,7 +192,7 @@ void CCTimer::update(ccTime dt)
|
|||
{
|
||||
if (m_fElapsed >= m_fInterval)
|
||||
{
|
||||
if (m_pTarget != NULL && m_pfnSelector != NULL)
|
||||
if (m_pTarget && m_pfnSelector)
|
||||
{
|
||||
(m_pTarget->*m_pfnSelector)(m_fElapsed);
|
||||
}
|
||||
|
|
|
@ -179,7 +179,7 @@ void CCControl::removeTargetWithActionForControlEvent(CCObject* target, SEL_Menu
|
|||
//remove all invocations if the target and action are null
|
||||
//TODO: should the invocations be deleted, or just removed from the array? Won't that cause issues if you add a single invocation for multiple events?
|
||||
bool bDeleteObjects=true;
|
||||
if (target == NULL && action == NULL)
|
||||
if (!target && !action)
|
||||
{
|
||||
//remove objects
|
||||
eventInvocationList->removeAllObjects();
|
||||
|
|
|
@ -1086,7 +1086,7 @@ void CCLabelBMFont::updateLabel()
|
|||
vector<unsigned short> last_word;
|
||||
last_word.reserve( stringLength );
|
||||
|
||||
unsigned int line = 1, i = 0;
|
||||
int line = 1, i = 0;
|
||||
bool start_line = false, start_word = false;
|
||||
float startOfLine = -1, startOfWord = -1;
|
||||
int skip = 0;
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
" \n\
|
||||
#ifdef GL_ES \n\
|
||||
" \n\
|
||||
#ifdef GL_ES \n\
|
||||
precision lowp float; \n\
|
||||
#endif \n\
|
||||
\n\
|
||||
varying vec4 v_fragmentColor; \n\
|
||||
varying vec2 v_texCoord; \n\
|
||||
uniform sampler2D u_texture; \n\
|
||||
uniform sampler2D u_mask; \n\
|
||||
\n\
|
||||
void main() \n\
|
||||
{ \n\
|
||||
vec4 texColor = texture2D(u_texture, v_texCoord); \n\
|
||||
vec4 maskColor = texture2D(u_mask, v_texCoord); \n\
|
||||
vec4 finalColor = vec4(texColor.r, texColor.g, texColor.b, maskColor.a * texColor.a); \n\
|
||||
gl_FragColor = v_fragmentColor * finalColor; \n\
|
||||
} \n\
|
||||
";
|
||||
#endif \n\
|
||||
\n\
|
||||
varying vec4 v_fragmentColor; \n\
|
||||
varying vec2 v_texCoord; \n\
|
||||
uniform sampler2D u_texture; \n\
|
||||
uniform sampler2D u_mask; \n\
|
||||
\n\
|
||||
void main() \n\
|
||||
{ \n\
|
||||
vec4 texColor = texture2D(u_texture, v_texCoord); \n\
|
||||
vec4 maskColor = texture2D(u_mask, v_texCoord); \n\
|
||||
vec4 finalColor = vec4(texColor.r, texColor.g, texColor.b, maskColor.a * texColor.a); \n\
|
||||
gl_FragColor = v_fragmentColor * finalColor; \n\
|
||||
} \n\
|
||||
";
|
||||
|
|
|
@ -613,17 +613,17 @@ void CCTMXMapInfo::startElement(void *ctx, const char *name, const char **atts)
|
|||
else if (elementName == "polygon")
|
||||
{
|
||||
// find parent object's dict and add polygon-points to it
|
||||
CCTMXObjectGroup* objectGroup = (CCTMXObjectGroup*)m_pObjectGroups->lastObject();
|
||||
CCDictionary* dict = (CCDictionary*)objectGroup->getObjects()->lastObject();
|
||||
//TODO: dict->setObject(attributeDict objectForKey:@"points"] forKey:@"polygonPoints"];
|
||||
// CCTMXObjectGroup* objectGroup = (CCTMXObjectGroup*)m_pObjectGroups->lastObject();
|
||||
// CCDictionary* dict = (CCDictionary*)objectGroup->getObjects()->lastObject();
|
||||
// TODO: dict->setObject(attributeDict objectForKey:@"points"] forKey:@"polygonPoints"];
|
||||
|
||||
}
|
||||
else if (elementName == "polyline")
|
||||
{
|
||||
// find parent object's dict and add polyline-points to it
|
||||
CCTMXObjectGroup* objectGroup = (CCTMXObjectGroup*)m_pObjectGroups->lastObject();
|
||||
CCDictionary* dict = (CCDictionary*)objectGroup->getObjects()->lastObject();
|
||||
//TODO: dict->setObject:[attributeDict objectForKey:@"points"] forKey:@"polylinePoints"];
|
||||
// CCTMXObjectGroup* objectGroup = (CCTMXObjectGroup*)m_pObjectGroups->lastObject();
|
||||
// CCDictionary* dict = (CCDictionary*)objectGroup->getObjects()->lastObject();
|
||||
// TODO: dict->setObject:[attributeDict objectForKey:@"points"] forKey:@"polylinePoints"];
|
||||
}
|
||||
|
||||
if (attributeDict)
|
||||
|
|
Loading…
Reference in New Issue