From 343c98af13a1d06fe872790fd7aab65270601fca Mon Sep 17 00:00:00 2001 From: James Chen Date: Mon, 29 Jul 2013 14:07:57 +0800 Subject: [PATCH] Fixing warnings of the order of member variables and fixing errors for tizen projects. --- cocos2dx/actions/CCActionInterval.cpp | 10 ++++----- cocos2dx/base_nodes/CCNode.cpp | 8 ++++--- cocos2dx/include/ccTypes.h | 2 +- cocos2dx/menu_nodes/CCMenuItem.h | 4 ++-- cocos2dx/misc_nodes/CCMotionStreak.cpp | 2 +- cocos2dx/misc_nodes/CCProgressTimer.cpp | 4 ++-- cocos2dx/misc_nodes/CCRenderTexture.cpp | 4 ++-- cocos2dx/particle_nodes/CCParticleSystem.cpp | 12 +++++----- cocos2dx/platform/mac/CCImage.mm | 2 +- cocos2dx/platform/tizen/CCImage.cpp | 4 ++-- cocos2dx/proj.tizen/.project | 19 +++++----------- cocos2dx/textures/CCTexture2D.cpp | 10 ++++----- cocos2dx/textures/CCTexture2D.h | 3 --- .../tilemap_parallax_nodes/CCTMXLayer.cpp | 15 +++++++++---- .../CCTMXObjectGroup.cpp | 4 ++-- .../tilemap_parallax_nodes/CCTileMapAtlas.cpp | 6 ++--- .../CCArmature/physics/CCPhysicsWorld.cpp | 8 +++---- extensions/CCBReader/CCBAnimationManager.cpp | 7 +++--- .../GUI/CCControlExtension/CCControl.cpp | 8 +++---- .../CCControlExtension/CCControlButton.cpp | 8 +++---- .../CCControlPotentiometer.cpp | 6 ++--- .../CCControlExtension/CCControlStepper.cpp | 10 ++++----- .../GUI/CCControlExtension/CCScale9Sprite.cpp | 10 ++++----- extensions/GUI/CCEditBox/CCEditBoxImplIOS.mm | 2 +- extensions/GUI/CCEditBox/CCEditBoxImplMac.mm | 4 +++- .../GUI/CCEditBox/CCEditBoxImplTizen.cpp | 22 +++++++++---------- extensions/network/SocketIO.cpp | 6 ++--- external/chipmunk/proj.tizen/.project | 5 ++--- 28 files changed, 102 insertions(+), 103 deletions(-) diff --git a/cocos2dx/actions/CCActionInterval.cpp b/cocos2dx/actions/CCActionInterval.cpp index aae2e323de..66ccbe88f8 100644 --- a/cocos2dx/actions/CCActionInterval.cpp +++ b/cocos2dx/actions/CCActionInterval.cpp @@ -1273,7 +1273,7 @@ void JumpTo::startWithTarget(Node *target) // Bezier cubic formula: // ((1 - t) + t)3 = 1 -// Expands toĦ­ +// Expands to ... // (1 - t)3 + 3t(1-t)2 + 3t2(1 - t) + t3 = 1 static inline float bezierat( float a, float b, float c, float d, float t ) { @@ -1987,11 +1987,11 @@ Animate* Animate::create(Animation *pAnimation) } Animate::Animate() -: _animation(NULL) -, _splitTimes(new std::vector) +: _splitTimes(new std::vector) , _nextFrame(0) , _origFrame(NULL) , _executedLoops(0) +, _animation(NULL) { } @@ -2155,8 +2155,8 @@ Animate* Animate::reverse() const // TargetedAction TargetedAction::TargetedAction() -: _forcedTarget(NULL) -, _action(NULL) +: _action(NULL) +, _forcedTarget(NULL) { } diff --git a/cocos2dx/base_nodes/CCNode.cpp b/cocos2dx/base_nodes/CCNode.cpp index 044d05436e..2c5657e677 100644 --- a/cocos2dx/base_nodes/CCNode.cpp +++ b/cocos2dx/base_nodes/CCNode.cpp @@ -64,6 +64,11 @@ Node::Node(void) , _anchorPoint(Point::ZERO) , _contentSize(Size::ZERO) , _additionalTransform(AffineTransformMakeIdentity()) +, _transform(AffineTransformMakeIdentity()) +, _inverse(AffineTransformMakeIdentity()) +, _additionalTransformDirty(false) +, _transformDirty(true) +, _inverseDirty(true) , _camera(NULL) // children (lazy allocs) // lazy alloc @@ -79,9 +84,6 @@ Node::Node(void) , _shaderProgram(NULL) , _orderOfArrival(0) , _running(false) -, _transformDirty(true) -, _inverseDirty(true) -, _additionalTransformDirty(false) , _visible(true) , _ignoreAnchorPointForPosition(false) , _reorderChildDirty(false) diff --git a/cocos2dx/include/ccTypes.h b/cocos2dx/include/ccTypes.h index bc8a163796..9cc3baf67e 100644 --- a/cocos2dx/include/ccTypes.h +++ b/cocos2dx/include/ccTypes.h @@ -412,8 +412,8 @@ public: : _fontSize(0) , _alignment(Label::HAlignment::CENTER) , _vertAlignment(Label::VAlignment::TOP) + , _dimensions(Size::ZERO) , _fontFillColor(Color3B::WHITE) - , _dimensions(Size::ZERO) {} // font name diff --git a/cocos2dx/menu_nodes/CCMenuItem.h b/cocos2dx/menu_nodes/CCMenuItem.h index 592d3f9ebb..b6136f14d5 100644 --- a/cocos2dx/menu_nodes/CCMenuItem.h +++ b/cocos2dx/menu_nodes/CCMenuItem.h @@ -128,8 +128,8 @@ public: static MenuItemLabel* create(Node *label); MenuItemLabel() - : _label(NULL) - , _originalScale(0.0) + : _originalScale(0.0) + , _label(NULL) {} virtual ~MenuItemLabel(); diff --git a/cocos2dx/misc_nodes/CCMotionStreak.cpp b/cocos2dx/misc_nodes/CCMotionStreak.cpp index 1e65cbd587..8e3d5dc081 100644 --- a/cocos2dx/misc_nodes/CCMotionStreak.cpp +++ b/cocos2dx/misc_nodes/CCMotionStreak.cpp @@ -37,6 +37,7 @@ MotionStreak::MotionStreak() : _fastMode(false) , _startingPositionInitialized(false) , _texture(NULL) +, _blendFunc(BlendFunc::ALPHA_NON_PREMULTIPLIED) , _positionR(Point::ZERO) , _stroke(0.0f) , _fadeDelta(0.0f) @@ -49,7 +50,6 @@ MotionStreak::MotionStreak() , _vertices(NULL) , _colorPointer(NULL) , _texCoords(NULL) -, _blendFunc(BlendFunc::ALPHA_NON_PREMULTIPLIED) { } diff --git a/cocos2dx/misc_nodes/CCProgressTimer.cpp b/cocos2dx/misc_nodes/CCProgressTimer.cpp index dbc09d05c4..3493ad9313 100644 --- a/cocos2dx/misc_nodes/CCProgressTimer.cpp +++ b/cocos2dx/misc_nodes/CCProgressTimer.cpp @@ -46,12 +46,12 @@ const char kProgressTextureCoords = 0x4b; ProgressTimer::ProgressTimer() :_type(Type::RADIAL) +,_midpoint(0,0) +,_barChangeRate(0,0) ,_percentage(0.0f) ,_sprite(NULL) ,_vertexDataCount(0) ,_vertexData(NULL) -,_midpoint(0,0) -,_barChangeRate(0,0) ,_reverseDirection(false) {} diff --git a/cocos2dx/misc_nodes/CCRenderTexture.cpp b/cocos2dx/misc_nodes/CCRenderTexture.cpp index 5f321b9c75..4281bd92d9 100644 --- a/cocos2dx/misc_nodes/CCRenderTexture.cpp +++ b/cocos2dx/misc_nodes/CCRenderTexture.cpp @@ -44,8 +44,7 @@ NS_CC_BEGIN // implementation RenderTexture RenderTexture::RenderTexture() -: _sprite(NULL) -, _FBO(0) +: _FBO(0) , _depthRenderBufffer(0) , _oldFBO(0) , _texture(0) @@ -57,6 +56,7 @@ RenderTexture::RenderTexture() , _clearDepth(0.0f) , _clearStencil(0) , _autoDraw(false) +, _sprite(NULL) { #if CC_ENABLE_CACHE_TEXTURE_DATA // Listen this event to save render texture before come to background. diff --git a/cocos2dx/particle_nodes/CCParticleSystem.cpp b/cocos2dx/particle_nodes/CCParticleSystem.cpp index 90aa34e547..865d05ec86 100644 --- a/cocos2dx/particle_nodes/CCParticleSystem.cpp +++ b/cocos2dx/particle_nodes/CCParticleSystem.cpp @@ -81,7 +81,9 @@ NS_CC_BEGIN // ParticleSystem::ParticleSystem() -: _plistFile("") +: _isBlendAdditive(false) +, _isAutoRemoveOnFinish(false) +, _plistFile("") , _elapsed(0) , _particles(NULL) , _emitCounter(0) @@ -99,6 +101,7 @@ ParticleSystem::ParticleSystem() , _lifeVar(0) , _angle(0) , _angleVar(0) +, _emitterMode(Mode::GRAVITY) , _startSize(0) , _startSizeVar(0) , _endSize(0) @@ -110,12 +113,9 @@ ParticleSystem::ParticleSystem() , _emissionRate(0) , _totalParticles(0) , _texture(NULL) -, _opacityModifyRGB(false) -, _isBlendAdditive(false) -, _positionType(PositionType::FREE) -, _isAutoRemoveOnFinish(false) -, _emitterMode(Mode::GRAVITY) , _blendFunc(BlendFunc::ALPHA_PREMULTIPLIED) +, _opacityModifyRGB(false) +, _positionType(PositionType::FREE) { modeA.gravity = Point::ZERO; modeA.speed = 0; diff --git a/cocos2dx/platform/mac/CCImage.mm b/cocos2dx/platform/mac/CCImage.mm index 80a1402727..42c2387724 100644 --- a/cocos2dx/platform/mac/CCImage.mm +++ b/cocos2dx/platform/mac/CCImage.mm @@ -303,8 +303,8 @@ static bool _isValidFontName(const char *fontName) } } } -#endif out: +#endif return ret; } diff --git a/cocos2dx/platform/tizen/CCImage.cpp b/cocos2dx/platform/tizen/CCImage.cpp index fc9af7ad3a..a6200e4930 100644 --- a/cocos2dx/platform/tizen/CCImage.cpp +++ b/cocos2dx/platform/tizen/CCImage.cpp @@ -244,7 +244,7 @@ public: int lineWidth = textLines.at(line).lineWidth; if (eAlignMask == Image::TextAlign::CENTER || eAlignMask == Image::TextAlign::TOP || eAlignMask == Image::TextAlign::BOTTOM) { return (iMaxLineWidth - lineWidth) / 2; - } else if (eAlignMask == Image::TextAlign::RIGHT || eAlignMask == Image::TextAlign::TO_RIGHT || eAlignMask == Image::TextAlign::BOTTOM_RIGHT) { + } else if (eAlignMask == Image::TextAlign::RIGHT || eAlignMask == Image::TextAlign::TOP_RIGHT || eAlignMask == Image::TextAlign::BOTTOM_RIGHT) { return (iMaxLineWidth - lineWidth); } @@ -428,7 +428,7 @@ bool Image::initWithString( const char * pText, int nWidth/* = 0*/, int nHeight/* = 0*/, - ETextAlign eAlignMask/* = kAlignCenter*/, + TextAlign eAlignMask/* = kAlignCenter*/, const char * pFontName/* = nil*/, int nSize/* = 0*/) { diff --git a/cocos2dx/proj.tizen/.project b/cocos2dx/proj.tizen/.project index f2080913f9..96199d85bb 100644 --- a/cocos2dx/proj.tizen/.project +++ b/cocos2dx/proj.tizen/.project @@ -7,8 +7,11 @@ org.eclipse.cdt.managedbuilder.core.genmakebuilder - clean,full,incremental, + + ?children? + ?name?=outputEntries\|?children?=?name?=entry\\\\\\\|\\\|?name?=entry\\\\\\\|\\\|?name?=entry\\\\\\\|\\\|\|| + ?name? @@ -31,7 +34,7 @@ org.eclipse.cdt.make.core.buildLocation - ${workspace_loc:/cocos2dx/Debug-Tizen-Device} + ${workspace_loc:/cocos2dx/Debug-Tizen-Emulator} org.eclipse.cdt.make.core.cleanBuildTarget @@ -43,7 +46,7 @@ org.eclipse.cdt.make.core.enableAutoBuild - false + true org.eclipse.cdt.make.core.enableCleanBuild @@ -347,16 +350,6 @@ 1 PARENT-1-PROJECT_LOC/platform/CCThread.h - - src/platform/platform.cpp - 1 - PARENT-1-PROJECT_LOC/platform/platform.cpp - - - src/platform/platform.h - 1 - PARENT-1-PROJECT_LOC/platform/platform.h - src/platform/tizen 2 diff --git a/cocos2dx/textures/CCTexture2D.cpp b/cocos2dx/textures/CCTexture2D.cpp index f31df24b7a..78e8a79380 100644 --- a/cocos2dx/textures/CCTexture2D.cpp +++ b/cocos2dx/textures/CCTexture2D.cpp @@ -57,14 +57,12 @@ NS_CC_BEGIN // Default is: RGBA8888 (32-bit textures) static Texture2D::PixelFormat g_defaultAlphaPixelFormat = Texture2D::PixelFormat::DEFAULT; -// By default PVR images are treated as if they don't have the alpha channel premultiplied -static bool PVRHaveAlphaPremultiplied_ = false; +static bool _PVRHaveAlphaPremultiplied = false; Texture2D::Texture2D() -: _PVRHaveAlphaPremultiplied(true) +: _pixelFormat(Texture2D::PixelFormat::DEFAULT) , _pixelsWide(0) , _pixelsHigh(0) -, _pixelFormat(Texture2D::PixelFormat::DEFAULT) , _name(0) , _maxS(0.0) , _maxT(0.0) @@ -664,7 +662,7 @@ bool Texture2D::initWithPVRFile(const char* file) _contentSize = Size((float)_pixelsWide, (float)_pixelsHigh); // FIX ME, if premultiply should be false, or the test case in RenderTextureTest(RenderTextureTargetNode) works in wrong effect //_hasPremultipliedAlpha = (pvr->isForcePremultipliedAlpha()) ? pvr->hasPremultipliedAlpha() : _PVRHaveAlphaPremultiplied; - _hasPremultipliedAlpha =PVRHaveAlphaPremultiplied_; + _hasPremultipliedAlpha = _PVRHaveAlphaPremultiplied; _pixelFormat = pvr->getFormat(); _hasMipmaps = pvr->getNumberOfMipmaps() > 1; @@ -708,7 +706,7 @@ bool Texture2D::initWithETCFile(const char* file) void Texture2D::PVRImagesHavePremultipliedAlpha(bool haveAlphaPremultiplied) { - PVRHaveAlphaPremultiplied_ = haveAlphaPremultiplied; + _PVRHaveAlphaPremultiplied = haveAlphaPremultiplied; } diff --git a/cocos2dx/textures/CCTexture2D.h b/cocos2dx/textures/CCTexture2D.h index 0a5a234678..ad922d249a 100644 --- a/cocos2dx/textures/CCTexture2D.h +++ b/cocos2dx/textures/CCTexture2D.h @@ -268,9 +268,6 @@ public: private: bool initPremultipliedATextureWithImage(Image * image, unsigned int pixelsWide, unsigned int pixelsHigh); - - // By default PVR images are treated as if they don't have the alpha channel premultiplied - bool _PVRHaveAlphaPremultiplied; protected: /** pixel format of the texture */ diff --git a/cocos2dx/tilemap_parallax_nodes/CCTMXLayer.cpp b/cocos2dx/tilemap_parallax_nodes/CCTMXLayer.cpp index 4929e12d70..61bd2a07b4 100644 --- a/cocos2dx/tilemap_parallax_nodes/CCTMXLayer.cpp +++ b/cocos2dx/tilemap_parallax_nodes/CCTMXLayer.cpp @@ -98,14 +98,21 @@ bool TMXLayer::initWithTilesetInfo(TMXTilesetInfo *tilesetInfo, TMXLayerInfo *la } TMXLayer::TMXLayer() -:_layerSize(Size::ZERO) +:_layerName("") +,_opacity(0) +,_minGID(0) +,_maxGID(0) +,_vertexZvalue(0) +,_useAutomaticVertexZ(false) +,_reusedTile(NULL) +,_atlasIndexArray(NULL) +,_contentScaleFactor(1.0f) +,_layerSize(Size::ZERO) ,_mapTileSize(Size::ZERO) ,_tiles(NULL) ,_tileSet(NULL) +,_layerOrientation(TMXOrientationOrtho) ,_properties(NULL) -,_layerName("") -,_reusedTile(NULL) -,_atlasIndexArray(NULL) {} TMXLayer::~TMXLayer() diff --git a/cocos2dx/tilemap_parallax_nodes/CCTMXObjectGroup.cpp b/cocos2dx/tilemap_parallax_nodes/CCTMXObjectGroup.cpp index 12fce07617..b4652873a4 100644 --- a/cocos2dx/tilemap_parallax_nodes/CCTMXObjectGroup.cpp +++ b/cocos2dx/tilemap_parallax_nodes/CCTMXObjectGroup.cpp @@ -32,8 +32,8 @@ NS_CC_BEGIN //implementation TMXObjectGroup TMXObjectGroup::TMXObjectGroup() - :_positionOffset(Point::ZERO) - ,_groupName("") + : _groupName("") + , _positionOffset(Point::ZERO) { _objects = Array::create(); _objects->retain(); diff --git a/cocos2dx/tilemap_parallax_nodes/CCTileMapAtlas.cpp b/cocos2dx/tilemap_parallax_nodes/CCTileMapAtlas.cpp index 483e607f85..8adfec66de 100644 --- a/cocos2dx/tilemap_parallax_nodes/CCTileMapAtlas.cpp +++ b/cocos2dx/tilemap_parallax_nodes/CCTileMapAtlas.cpp @@ -65,9 +65,9 @@ bool TileMapAtlas::initWithTileFile(const char *tile, const char *mapFile, int t } TileMapAtlas::TileMapAtlas() - :_TGAInfo(NULL) - ,_posToAtlasIndex(NULL) - ,_itemsToRender(0) + : _posToAtlasIndex(NULL) + , _itemsToRender(0) + , _TGAInfo(NULL) { } diff --git a/extensions/CCArmature/physics/CCPhysicsWorld.cpp b/extensions/CCArmature/physics/CCPhysicsWorld.cpp index 644c604ca3..0ccf8eb617 100644 --- a/extensions/CCArmature/physics/CCPhysicsWorld.cpp +++ b/extensions/CCArmature/physics/CCPhysicsWorld.cpp @@ -41,7 +41,7 @@ public: class ContactListener : public b2ContactListener { //! Callbacks for derived classes. - virtual void BeginContact(b2Contact *contact) + virtual void BeginContact(b2Contact *contact) override { if (contact) { @@ -53,17 +53,17 @@ class ContactListener : public b2ContactListener } B2_NOT_USED(contact); } - virtual void EndContact(b2Contact *contact) + virtual void EndContact(b2Contact *contact) override { contact_list.clear(); B2_NOT_USED(contact); } - virtual void PreSolve(b2Contact *contact, const b2Manifold *oldManifold) + virtual void PreSolve(b2Contact *contact, const b2Manifold *oldManifold) override { B2_NOT_USED(contact); B2_NOT_USED(oldManifold); } - virtual void PostSolve(const b2Contact *contact, const b2ContactImpulse *impulse) + virtual void PostSolve(b2Contact *contact, const b2ContactImpulse *impulse) override { B2_NOT_USED(contact); B2_NOT_USED(impulse); diff --git a/extensions/CCBReader/CCBAnimationManager.cpp b/extensions/CCBReader/CCBAnimationManager.cpp index 2c89f4aeeb..bd30b0a168 100644 --- a/extensions/CCBReader/CCBAnimationManager.cpp +++ b/extensions/CCBReader/CCBAnimationManager.cpp @@ -17,7 +17,9 @@ NS_CC_EXT_BEGIN // Implementation of CCBAinmationManager CCBAnimationManager::CCBAnimationManager() -: _sequences(NULL) +: _jsControlled(false) +, _owner(NULL) +, _sequences(NULL) , _nodeSequences(NULL) , _baseValues(NULL) , _autoPlaySequenceId(0) @@ -25,8 +27,7 @@ CCBAnimationManager::CCBAnimationManager() , _rootContainerSize(Size::ZERO) , _delegate(NULL) , _runningSequence(NULL) -, _jsControlled(false) -, _owner(NULL) + { init(); } diff --git a/extensions/GUI/CCControlExtension/CCControl.cpp b/extensions/GUI/CCControlExtension/CCControl.cpp index b32ee30225..03aeab0594 100644 --- a/extensions/GUI/CCControlExtension/CCControl.cpp +++ b/extensions/GUI/CCControlExtension/CCControl.cpp @@ -37,13 +37,13 @@ NS_CC_EXT_BEGIN Control::Control() -: _isOpacityModifyRGB(false) -, _state(State::NORMAL) -, _hasVisibleParents(false) -, _enabled(false) +: _enabled(false) , _selected(false) , _highlighted(false) +, _hasVisibleParents(false) , _dispatchTable(NULL) +, _isOpacityModifyRGB(false) +, _state(State::NORMAL) { } diff --git a/extensions/GUI/CCControlExtension/CCControlButton.cpp b/extensions/GUI/CCControlExtension/CCControlButton.cpp index 7f3a521612..ddbee20262 100644 --- a/extensions/GUI/CCControlExtension/CCControlButton.cpp +++ b/extensions/GUI/CCControlExtension/CCControlButton.cpp @@ -42,14 +42,14 @@ enum }; ControlButton::ControlButton() -: _currentTitle(NULL) -, _currentTitleColor(Color3B::WHITE) +: _isPushed(false) +, _parentInited(false) , _doesAdjustBackgroundImage(false) +, _currentTitle(NULL) +, _currentTitleColor(Color3B::WHITE) , _titleLabel(NULL) , _backgroundSprite(NULL) , _zoomOnTouchDown(false) -, _isPushed(false) -, _parentInited(false) , _titleDispatchTable(NULL) , _titleColorDispatchTable(NULL) , _titleLabelDispatchTable(NULL) diff --git a/extensions/GUI/CCControlExtension/CCControlPotentiometer.cpp b/extensions/GUI/CCControlExtension/CCControlPotentiometer.cpp index fdc957e608..40907afca8 100644 --- a/extensions/GUI/CCControlExtension/CCControlPotentiometer.cpp +++ b/extensions/GUI/CCControlExtension/CCControlPotentiometer.cpp @@ -31,11 +31,11 @@ NS_CC_EXT_BEGIN ControlPotentiometer::ControlPotentiometer() -: _thumbSprite(NULL) -, _progressTimer(NULL) -, _value(0.0f) +: _value(0.0f) , _minimumValue(0.0f) , _maximumValue(0.0f) +, _thumbSprite(NULL) +, _progressTimer(NULL) { } diff --git a/extensions/GUI/CCControlExtension/CCControlStepper.cpp b/extensions/GUI/CCControlExtension/CCControlStepper.cpp index f1c504d528..a14343b5ad 100644 --- a/extensions/GUI/CCControlExtension/CCControlStepper.cpp +++ b/extensions/GUI/CCControlExtension/CCControlStepper.cpp @@ -39,11 +39,7 @@ NS_CC_EXT_BEGIN #define kAutorepeatIncreaseTimeIncrement 12 ControlStepper::ControlStepper() -: _minusSprite(NULL) -, _plusSprite(NULL) -, _minusLabel(NULL) -, _plusLabel(NULL) -, _value(0.0) +: _value(0.0) , _continuous(false) , _autorepeat(false) , _wraps(false) @@ -53,6 +49,10 @@ ControlStepper::ControlStepper() , _touchInsideFlag(false) , _touchedPart(Part::NONE) , _autorepeatCount(0) +, _minusSprite(NULL) +, _plusSprite(NULL) +, _minusLabel(NULL) +, _plusLabel(NULL) { } diff --git a/extensions/GUI/CCControlExtension/CCScale9Sprite.cpp b/extensions/GUI/CCControlExtension/CCScale9Sprite.cpp index 8e588b5706..a086e475b5 100644 --- a/extensions/GUI/CCControlExtension/CCScale9Sprite.cpp +++ b/extensions/GUI/CCControlExtension/CCScale9Sprite.cpp @@ -43,11 +43,7 @@ enum positions }; Scale9Sprite::Scale9Sprite() -: _insetLeft(0) -, _insetTop(0) -, _insetRight(0) -, _insetBottom(0) -, _spritesGenerated(false) +: _spritesGenerated(false) , _spriteFrameRotated(false) , _positionsAreDirty(false) , _scale9Image(NULL) @@ -61,6 +57,10 @@ Scale9Sprite::Scale9Sprite() , _bottom(NULL) , _bottomRight(NULL) , _opacityModifyRGB(false) +, _insetLeft(0) +, _insetTop(0) +, _insetRight(0) +, _insetBottom(0) { } diff --git a/extensions/GUI/CCEditBox/CCEditBoxImplIOS.mm b/extensions/GUI/CCEditBox/CCEditBoxImplIOS.mm index 0848178220..a4cbae50ba 100644 --- a/extensions/GUI/CCEditBox/CCEditBoxImplIOS.mm +++ b/extensions/GUI/CCEditBox/CCEditBoxImplIOS.mm @@ -257,8 +257,8 @@ EditBoxImplIOS::EditBoxImplIOS(EditBox* pEditText) : EditBoxImpl(pEditText) , _label(NULL) , _labelPlaceHolder(NULL) -, _systemControl(NULL) , _anchorPoint(Point(0.5f, 0.5f)) +, _systemControl(NULL) , _maxTextLength(-1) { _inRetinaMode = [[CCEAGLView sharedEGLView] contentScaleFactor] == 2.0f ? true : false; diff --git a/extensions/GUI/CCEditBox/CCEditBoxImplMac.mm b/extensions/GUI/CCEditBox/CCEditBoxImplMac.mm index 0dfac0adc0..941687acec 100644 --- a/extensions/GUI/CCEditBox/CCEditBoxImplMac.mm +++ b/extensions/GUI/CCEditBox/CCEditBoxImplMac.mm @@ -234,8 +234,10 @@ EditBoxImpl* __createSystemEditBox(EditBox* pEditBox) } EditBoxImplMac::EditBoxImplMac(EditBox* pEditText) -: EditBoxImpl(pEditText), _sysEdit(NULL), _maxTextLength(-1) +: EditBoxImpl(pEditText) , _anchorPoint(Point(0.5f, 0.5f)) +, _maxTextLength(-1) +, _sysEdit(NULL) { //! TODO: Retina on Mac //! _inRetinaMode = [[CCEAGLView sharedEGLView] contentScaleFactor] == 2.0f ? true : false; diff --git a/extensions/GUI/CCEditBox/CCEditBoxImplTizen.cpp b/extensions/GUI/CCEditBox/CCEditBoxImplTizen.cpp index c5d6fda658..705034c0af 100644 --- a/extensions/GUI/CCEditBox/CCEditBoxImplTizen.cpp +++ b/extensions/GUI/CCEditBox/CCEditBoxImplTizen.cpp @@ -46,7 +46,7 @@ EditBoxImplTizen::EditBoxImplTizen(EditBox* pEditText) , _labelPlaceHolder(NULL) , _editBoxInputMode(EditBox::InputMode::SINGLE_LINE) , _editBoxInputFlag(EditBox::InputFlag::INTIAL_CAPS_ALL_CHARACTERS) -, _keyboardReturnType(kKeyboardReturnTypeDefault) +, _keyboardReturnType(EditBox::KeyboardReturnType::DEFAULT) , _colText(Color3B::WHITE) , _colPlaceHolder(Color3B::GRAY) , _maxLength(-1) @@ -65,7 +65,7 @@ static const int CC_EDIT_BOX_PADDING = 5; bool EditBoxImplTizen::initWithSize(const Size& size) { - int fontSize = (int)size.height-12; +// int fontSize = (int)size.height-12; _label = LabelTTF::create("", "", size.height-12); // align the text vertically center _label->setAnchorPoint(Point(0, 0.5f)); @@ -160,7 +160,7 @@ void EditBoxImplTizen::setText(const char* pText) std::string strToShow; - if (kEditBoxInputFlagPassword == _editBoxInputFlag) + if (EditBox::InputFlag::PASSWORD == _editBoxInputFlag) { long length = cc_utf8_strlen(_text.c_str(), -1); for (long i = 0; i < length; i++) @@ -284,21 +284,21 @@ void EditBoxImplTizen::openKeyboard() bool bSingleLineEnabled = false; switch (_editBoxInputMode) { - case kEditBoxInputModeAny: + case EditBox::InputMode::ANY: keypadStyle = KEYPAD_STYLE_NORMAL; break; - case kEditBoxInputModeEmailAddr: + case EditBox::InputMode::EMAIL_ADDRESS: keypadStyle = KEYPAD_STYLE_EMAIL; break; - case kEditBoxInputModeNumeric: - case kEditBoxInputModeDecimal: + case EditBox::InputMode::NUMERIC: + case EditBox::InputMode::DECIMAL: keypadStyle = KEYPAD_STYLE_NUMBER; keypadCategory = KEYPAD_MODE_NUMERIC; break; - case kEditBoxInputModePhoneNumber: + case EditBox::InputMode::PHONE_NUMBER: keypadStyle = KEYPAD_STYLE_PHONE_NUMBER; break; - case kEditBoxInputModeUrl: + case EditBox::InputMode::URL: keypadStyle = KEYPAD_STYLE_URL; break; case EditBox::InputMode::SINGLE_LINE: @@ -312,10 +312,10 @@ void EditBoxImplTizen::openKeyboard() bool bTextPrediction = true; switch (_editBoxInputFlag) { - case kEditBoxInputFlagPassword: + case EditBox::InputFlag::PASSWORD: keypadStyle = KEYPAD_STYLE_PASSWORD; break; - case kEditBoxInputFlagSensitive: + case EditBox::InputFlag::SENSITIVE: bTextPrediction = false; break; default: diff --git a/extensions/network/SocketIO.cpp b/extensions/network/SocketIO.cpp index b1f4131602..3921e3cdcd 100644 --- a/extensions/network/SocketIO.cpp +++ b/extensions/network/SocketIO.cpp @@ -490,11 +490,11 @@ void SIOClientImpl::onError(cocos2d::extension::WebSocket* ws, const cocos2d::ex //begin SIOClient methods SIOClient::SIOClient(const std::string& host, int port, const std::string& path, SIOClientImpl* impl, SocketIO::SIODelegate& delegate) - : _host(host) - , _port(port) + : _port(port) + , _host(host) , _path(path) + , _connected(false) , _socket(impl) - , _connected(false) , _delegate(&delegate) { diff --git a/external/chipmunk/proj.tizen/.project b/external/chipmunk/proj.tizen/.project index 1f7cbcd8ee..0542d33de2 100644 --- a/external/chipmunk/proj.tizen/.project +++ b/external/chipmunk/proj.tizen/.project @@ -7,7 +7,6 @@ org.eclipse.cdt.managedbuilder.core.genmakebuilder - clean,full,incremental, ?name? @@ -31,7 +30,7 @@ org.eclipse.cdt.make.core.buildLocation - ${workspace_loc:/chipmunk/Debug-Tizen-Device} + ${workspace_loc:/chipmunk/Debug-Tizen-Emulator} org.eclipse.cdt.make.core.cleanBuildTarget @@ -43,7 +42,7 @@ org.eclipse.cdt.make.core.enableAutoBuild - false + true org.eclipse.cdt.make.core.enableCleanBuild