From f5afa09de10cd36927b166b03c722053238920e2 Mon Sep 17 00:00:00 2001 From: Dhilan007 Date: Fri, 17 Jan 2014 09:46:59 +0800 Subject: [PATCH] remove unneeded empty line. --- cocos/2d/CCFontAtlasCache.h | 7 ++----- cocos/2d/CCFontCharMap.h | 8 ++------ cocos/2d/CCLabelTextFormatter.cpp | 2 +- 3 files changed, 5 insertions(+), 12 deletions(-) diff --git a/cocos/2d/CCFontAtlasCache.h b/cocos/2d/CCFontAtlasCache.h index f9e84ba904..31d785dc73 100644 --- a/cocos/2d/CCFontAtlasCache.h +++ b/cocos/2d/CCFontAtlasCache.h @@ -35,10 +35,8 @@ NS_CC_BEGIN class CC_DLL FontAtlasCache -{ - +{ public: - static FontAtlas * getFontAtlasTTF(const std::string& fontFileName, int size, GlyphCollection glyphs, const char *customGlyphs = 0, bool useDistanceField = false); static FontAtlas * getFontAtlasFNT(const std::string& fontFileName); @@ -48,8 +46,7 @@ public: static bool releaseFontAtlas(FontAtlas *atlas); -private: - +private: static std::string generateFontName(const std::string& fontFileName, int size, GlyphCollection theGlyphs, bool useDistanceField); static std::unordered_map _atlasMap; }; diff --git a/cocos/2d/CCFontCharMap.h b/cocos/2d/CCFontCharMap.h index f77c855c08..23caaeff22 100644 --- a/cocos/2d/CCFontCharMap.h +++ b/cocos/2d/CCFontCharMap.h @@ -32,10 +32,8 @@ NS_CC_BEGIN class FontCharMap : public Font -{ - +{ public: - static FontCharMap * create(const std::string& charMapFile, int itemWidth, int itemHeight, int startCharMap); static FontCharMap * create(Texture2D* texture, int itemWidth, int itemHeight, int startCharMap); static FontCharMap * create(const std::string& plistFile); @@ -44,8 +42,7 @@ public: virtual Rect getRectForChar(unsigned short theChar) const override; virtual FontAtlas *createFontAtlas() override; -protected: - +protected: FontCharMap(Texture2D* texture,int itemWidth, int itemHeight, int startCharMap) : _texture(texture),_itemWidth(itemWidth),_itemHeight(itemHeight),_mapStartChar(startCharMap),_charRect(0,0,itemWidth,itemHeight){} /** @@ -55,7 +52,6 @@ protected: virtual ~FontCharMap(); private: - Texture2D* _texture; int _mapStartChar; int _itemWidth; diff --git a/cocos/2d/CCLabelTextFormatter.cpp b/cocos/2d/CCLabelTextFormatter.cpp index 550d017beb..69d6efaae8 100644 --- a/cocos/2d/CCLabelTextFormatter.cpp +++ b/cocos/2d/CCLabelTextFormatter.cpp @@ -353,7 +353,7 @@ bool LabelTextFormatter::createStringSprites(LabelTextFormatProtocol *theLabel) Point fontPos = Point((float)nextFontPositionX + charXOffset + charRect.size.width * 0.5f + kerningAmount, - (float)nextFontPositionY + yOffset - charRect.size.height * 0.5f); + (float)nextFontPositionY + yOffset - charRect.size.height * 0.5f); if( theLabel->recordLetterInfo(CC_POINT_PIXELS_TO_POINTS(fontPos),c,i) == false) {