From b7a33afc71f12a68a7d49a6d107f34fe962b96a9 Mon Sep 17 00:00:00 2001 From: James Chen Date: Wed, 19 Jun 2013 14:09:23 +0800 Subject: [PATCH] fixed #2303: float assignment fix. --- cocos2dx/textures/CCTexture2D.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/cocos2dx/textures/CCTexture2D.cpp b/cocos2dx/textures/CCTexture2D.cpp index f854894c55..a8076190b0 100644 --- a/cocos2dx/textures/CCTexture2D.cpp +++ b/cocos2dx/textures/CCTexture2D.cpp @@ -544,10 +544,10 @@ bool CCTexture2D::initWithString(const char *text, ccFontDefinition *textDefinit // handle shadow parameters bool shadowEnabled = false; - float shadowDX = 0.0; - float shadowDY = 0.0; - float shadowBlur = 0.0; - float shadowOpacity = 0.0; + float shadowDX = 0.0f; + float shadowDY = 0.0f; + float shadowBlur = 0.0f; + float shadowOpacity = 0.0f; if ( textDefinition->_shadow._shadowEnabled ) { @@ -560,10 +560,10 @@ bool CCTexture2D::initWithString(const char *text, ccFontDefinition *textDefinit // handle stroke parameters bool strokeEnabled = false; - float strokeColorR = 0.0; - float strokeColorG = 0.0; - float strokeColorB = 0.0; - float strokeSize = 0.0; + float strokeColorR = 0.0f; + float strokeColorG = 0.0f; + float strokeColorB = 0.0f; + float strokeSize = 0.0f; if ( textDefinition->_stroke._strokeEnabled ) {