Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
6 cocos2dx/label_nodes/CCLabelBMFont.cpp
@@ -651,17 +651,17 @@ void CCBMFontConfiguration::parseCharacterDefinition(std::string line, ccBMFontD
651 651 index = line.find("xoffset=");
652 652 index2 = line.find(' ', index);
653 653 value = line.substr(index, index2-index);
654   - sscanf(value.c_str(), "xoffset=%d", &characterDefinition->xOffset);
  654 + sscanf(value.c_str(), "xoffset=%hd", &characterDefinition->xOffset);
655 655 // Character yoffset
656 656 index = line.find("yoffset=");
657 657 index2 = line.find(' ', index);
658 658 value = line.substr(index, index2-index);
659   - sscanf(value.c_str(), "yoffset=%d", &characterDefinition->yOffset);
  659 + sscanf(value.c_str(), "yoffset=%hd", &characterDefinition->yOffset);
660 660 // Character xadvance
661 661 index = line.find("xadvance=");
662 662 index2 = line.find(' ', index);
663 663 value = line.substr(index, index2-index);
664   - sscanf(value.c_str(), "xadvance=%d", &characterDefinition->xAdvance);
  664 + sscanf(value.c_str(), "xadvance=%hd", &characterDefinition->xAdvance);
665 665 }
666 666
667 667 void CCBMFontConfiguration::parseKerningCapacity(std::string line)
2  cocos2dx/platform/ios/ES1Renderer.m
@@ -185,7 +185,7 @@ -(CGSize) backingSize
185 185
186 186 - (NSString*) description
187 187 {
188   - return [NSString stringWithFormat:@"<%@ = %08X | size = %ix%i>", [self class], self, backingWidth_, backingHeight_];
  188 + return [NSString stringWithFormat:@"<%@ = %p | size = %ix%i>", [self class], self, backingWidth_, backingHeight_];
189 189 }
190 190
191 191

0 comments on commit c01a799

Please sign in to comment.
Something went wrong with that request. Please try again.