Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #1181 from psineur/fix-stringFormatWarnings-XCode4

Fix XCode 4.4 compiler warnings about string formatting.
  • Loading branch information...
commit c01a799316454c60de2d403cbe16b852d574eff6 2 parents 6cd457a + 3279432
@minggo minggo authored
View
6 cocos2dx/label_nodes/CCLabelBMFont.cpp
@@ -651,17 +651,17 @@ void CCBMFontConfiguration::parseCharacterDefinition(std::string line, ccBMFontD
index = line.find("xoffset=");
index2 = line.find(' ', index);
value = line.substr(index, index2-index);
- sscanf(value.c_str(), "xoffset=%d", &characterDefinition->xOffset);
+ sscanf(value.c_str(), "xoffset=%hd", &characterDefinition->xOffset);
// Character yoffset
index = line.find("yoffset=");
index2 = line.find(' ', index);
value = line.substr(index, index2-index);
- sscanf(value.c_str(), "yoffset=%d", &characterDefinition->yOffset);
+ sscanf(value.c_str(), "yoffset=%hd", &characterDefinition->yOffset);
// Character xadvance
index = line.find("xadvance=");
index2 = line.find(' ', index);
value = line.substr(index, index2-index);
- sscanf(value.c_str(), "xadvance=%d", &characterDefinition->xAdvance);
+ sscanf(value.c_str(), "xadvance=%hd", &characterDefinition->xAdvance);
}
void CCBMFontConfiguration::parseKerningCapacity(std::string line)
View
2  cocos2dx/platform/ios/ES1Renderer.m
@@ -185,7 +185,7 @@ -(CGSize) backingSize
- (NSString*) description
{
- return [NSString stringWithFormat:@"<%@ = %08X | size = %ix%i>", [self class], self, backingWidth_, backingHeight_];
+ return [NSString stringWithFormat:@"<%@ = %p | size = %ix%i>", [self class], self, backingWidth_, backingHeight_];
}
Please sign in to comment.
Something went wrong with that request. Please try again.