From d2746bbe90968ec967888491b885e3bf2569acc7 Mon Sep 17 00:00:00 2001 From: James Chen Date: Fri, 5 Jul 2013 13:58:59 +0800 Subject: [PATCH] issue #2373: Removing inline for virtual function. Adding more const getter functions. --- cocos2d_libs.xcodeproj/project.pbxproj.REMOVED.git-id | 2 +- cocos2dx/sprite_nodes/CCSprite.h | 10 +++++----- extensions/CCArmature/CCArmature.h | 4 ++-- extensions/physics_nodes/CCPhysicsSprite.cpp | 2 +- extensions/physics_nodes/CCPhysicsSprite.h | 2 +- .../samples.xcodeproj/project.pbxproj.REMOVED.git-id | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/cocos2d_libs.xcodeproj/project.pbxproj.REMOVED.git-id b/cocos2d_libs.xcodeproj/project.pbxproj.REMOVED.git-id index da326f8d66..52227f552a 100644 --- a/cocos2d_libs.xcodeproj/project.pbxproj.REMOVED.git-id +++ b/cocos2d_libs.xcodeproj/project.pbxproj.REMOVED.git-id @@ -1 +1 @@ -adc886b11ba99ac25a10739785bb0986e175a1a9 \ No newline at end of file +a99b08b2ffceb676a19dbcca403053c395c80351 \ No newline at end of file diff --git a/cocos2dx/sprite_nodes/CCSprite.h b/cocos2dx/sprite_nodes/CCSprite.h index ba4d98d180..5ea22a3aad 100644 --- a/cocos2dx/sprite_nodes/CCSprite.h +++ b/cocos2dx/sprite_nodes/CCSprite.h @@ -263,8 +263,8 @@ public: /// @name Functions inherited from TextureProtocol virtual void setTexture(Texture2D *texture); virtual Texture2D* getTexture(void); - inline void setBlendFunc(const ccBlendFunc &blendFunc) { _blendFunc = blendFunc; } - inline const ccBlendFunc& getBlendFunc(void) const { return _blendFunc; } + virtual void setBlendFunc(const ccBlendFunc &blendFunc) { _blendFunc = blendFunc; } + virtual const ccBlendFunc& getBlendFunc(void) const { return _blendFunc; } /// @} /// @{ @@ -400,17 +400,17 @@ public: * * @return true if the sprite needs to be updated in the Atlas, false otherwise. */ - inline virtual bool isDirty(void) const { return _dirty; } + virtual bool isDirty(void) const { return _dirty; } /** * Makes the Sprite to be updated in the Atlas. */ - inline virtual void setDirty(bool bDirty) { _dirty = bDirty; } + virtual void setDirty(bool bDirty) { _dirty = bDirty; } /** * Returns the quad (tex coords, vertex coords and color) information. */ - inline ccV3F_C4B_T2F_Quad getQuad(void) { return _quad; } + inline ccV3F_C4B_T2F_Quad getQuad(void) const { return _quad; } /** * Returns whether or not the texture rectangle is rotated. diff --git a/extensions/CCArmature/CCArmature.h b/extensions/CCArmature/CCArmature.h index 71ebcc7006..7d20c60338 100644 --- a/extensions/CCArmature/CCArmature.h +++ b/extensions/CCArmature/CCArmature.h @@ -120,8 +120,8 @@ public: */ virtual void updateOffsetPoint(); - inline void setBlendFunc(const ccBlendFunc& blendFunc) { _blendFunc = blendFunc; } - inline const ccBlendFunc& getBlendFunc(void) const { return _blendFunc; } + virtual void setBlendFunc(const ccBlendFunc& blendFunc) { _blendFunc = blendFunc; } + virtual const ccBlendFunc& getBlendFunc(void) const { return _blendFunc; } protected: diff --git a/extensions/physics_nodes/CCPhysicsSprite.cpp b/extensions/physics_nodes/CCPhysicsSprite.cpp index feba6a3f57..8f96926e23 100644 --- a/extensions/physics_nodes/CCPhysicsSprite.cpp +++ b/extensions/physics_nodes/CCPhysicsSprite.cpp @@ -150,7 +150,7 @@ PhysicsSprite* PhysicsSprite::create(const char *pszFileName, const Rect& rect) // this method will only get called if the sprite is batched. // return YES if the physic's values (angles, position ) changed. // If you return NO, then nodeToParentTransform won't be called. -bool PhysicsSprite::isDirty() +bool PhysicsSprite::isDirty() const { return true; } diff --git a/extensions/physics_nodes/CCPhysicsSprite.h b/extensions/physics_nodes/CCPhysicsSprite.h index 1d11738a20..b0b2664ed0 100644 --- a/extensions/physics_nodes/CCPhysicsSprite.h +++ b/extensions/physics_nodes/CCPhysicsSprite.h @@ -90,7 +90,7 @@ public: */ static PhysicsSprite* create(const char *pszFileName, const Rect& rect); - virtual bool isDirty(); + virtual bool isDirty() const; /** Keep the sprite's rotation separate from the body. */ bool isIgnoreBodyRotation() const; diff --git a/samples/samples.xcodeproj/project.pbxproj.REMOVED.git-id b/samples/samples.xcodeproj/project.pbxproj.REMOVED.git-id index 2515353d43..303698521a 100644 --- a/samples/samples.xcodeproj/project.pbxproj.REMOVED.git-id +++ b/samples/samples.xcodeproj/project.pbxproj.REMOVED.git-id @@ -1 +1 @@ -7dd3951b42436200ea99bfba88c15872e9f62825 \ No newline at end of file +678e714c9c548501d076d34e2af0b13619e0a5aa \ No newline at end of file