mirror of https://github.com/axmolengine/axmol.git
closed #2413: Warning fixes for overload virtual functions.
This commit is contained in:
parent
eb475174b6
commit
f4edc7a922
|
@ -1 +1 @@
|
|||
1ab0fd6fdad74af8ce054c089d8571a05a7a04d8
|
||||
62276b5bbca4f4c7b09fa6f3eab9d01aaa7a8372
|
|
@ -52,7 +52,7 @@ public:
|
|||
virtual void startWithTarget(Node *pTarget);
|
||||
|
||||
/** initializes the action with size and duration */
|
||||
virtual bool initWithDuration(float duration, const Size& gridSize);
|
||||
bool initWithDuration(float duration, const Size& gridSize);
|
||||
|
||||
/** returns the grid */
|
||||
virtual GridBase* getGrid(void);
|
||||
|
|
|
@ -68,7 +68,7 @@ class CC_DLL FlipX3D : public Grid3DAction
|
|||
{
|
||||
public:
|
||||
/** initializes the action with duration */
|
||||
virtual bool initWithDuration(float duration);
|
||||
bool initWithDuration(float duration);
|
||||
virtual bool initWithSize(const Size& gridSize, float duration);
|
||||
|
||||
/** returns a new clone of the action */
|
||||
|
|
|
@ -250,14 +250,14 @@ public:
|
|||
virtual ~CallFunc();
|
||||
|
||||
/** initializes the action with the callback
|
||||
|
||||
typedef void (Object::*SEL_CallFunc)();
|
||||
@deprecated Use the std::function API instead.
|
||||
*/
|
||||
virtual bool initWithTarget(Object* pSelectorTarget);
|
||||
CC_DEPRECATED_ATTRIBUTE bool initWithTarget(Object* pSelectorTarget);
|
||||
|
||||
/** initializes the action with the std::function<void()>
|
||||
*/
|
||||
virtual bool initWithFunction(const std::function<void()>& func);
|
||||
bool initWithFunction(const std::function<void()>& func);
|
||||
|
||||
/** executes the callback */
|
||||
virtual void execute();
|
||||
|
@ -329,14 +329,14 @@ public:
|
|||
|
||||
/** initializes the action with the std::function<void(Node*)>
|
||||
*/
|
||||
virtual bool initWithFunction(const std::function<void(Node*)>& func);
|
||||
bool initWithFunction(const std::function<void(Node*)>& func);
|
||||
|
||||
/** initializes the action with the callback
|
||||
|
||||
typedef void (Object::*SEL_CallFuncN)(Node*);
|
||||
@deprecated Use the std::function API instead.
|
||||
*/
|
||||
CC_DEPRECATED_ATTRIBUTE virtual bool initWithTarget(Object* pSelectorTarget, SEL_CallFuncN selector);
|
||||
CC_DEPRECATED_ATTRIBUTE bool initWithTarget(Object* pSelectorTarget, SEL_CallFuncN selector);
|
||||
|
||||
virtual long getClassTypeInfo() {
|
||||
static const long id = cocos2d::getHashCodeByString(typeid(cocos2d::CallFunc).name());
|
||||
|
|
|
@ -266,7 +266,7 @@ public:
|
|||
/** initializes the action */
|
||||
bool initWithDuration(float fDuration, float fDeltaAngle);
|
||||
|
||||
virtual bool initWithDuration(float fDuration, float fDeltaAngleX, float fDeltaAngleY);
|
||||
bool initWithDuration(float fDuration, float fDeltaAngleX, float fDeltaAngleY);
|
||||
|
||||
//
|
||||
// Overrides
|
||||
|
@ -378,7 +378,7 @@ public:
|
|||
static SkewTo* create(float t, float sx, float sy);
|
||||
|
||||
SkewTo();
|
||||
virtual bool initWithDuration(float t, float sx, float sy);
|
||||
bool initWithDuration(float t, float sx, float sy);
|
||||
|
||||
//
|
||||
// Overrides
|
||||
|
@ -408,7 +408,7 @@ public:
|
|||
/** creates the action */
|
||||
static SkewBy* create(float t, float deltaSkewX, float deltaSkewY);
|
||||
|
||||
virtual bool initWithDuration(float t, float sx, float sy);
|
||||
bool initWithDuration(float t, float sx, float sy);
|
||||
|
||||
//
|
||||
// Overrides
|
||||
|
|
|
@ -39,7 +39,7 @@ class CC_DLL ShakyTiles3D : public TiledGrid3DAction
|
|||
{
|
||||
public:
|
||||
/** initializes the action with a range, whether or not to shake Z vertices, a grid size, and duration */
|
||||
virtual bool initWithDuration(float duration, const Size& gridSize, int nRange, bool bShakeZ);
|
||||
bool initWithDuration(float duration, const Size& gridSize, int nRange, bool bShakeZ);
|
||||
|
||||
/** returns a new clone of the action */
|
||||
virtual ShakyTiles3D* clone() const;
|
||||
|
@ -61,7 +61,7 @@ class CC_DLL ShatteredTiles3D : public TiledGrid3DAction
|
|||
{
|
||||
public:
|
||||
/** initializes the action with a range, whether or not to shatter Z vertices, a grid size and duration */
|
||||
virtual bool initWithDuration(float duration, const Size& gridSize, int nRange, bool bShatterZ);
|
||||
bool initWithDuration(float duration, const Size& gridSize, int nRange, bool bShatterZ);
|
||||
|
||||
/** returns a new clone of the action */
|
||||
virtual ShatteredTiles3D* clone() const;
|
||||
|
@ -87,7 +87,7 @@ class CC_DLL ShuffleTiles : public TiledGrid3DAction
|
|||
public:
|
||||
~ShuffleTiles(void);
|
||||
/** initializes the action with a random seed, the grid size and the duration */
|
||||
virtual bool initWithDuration(float duration, const Size& gridSize, unsigned int seed);
|
||||
bool initWithDuration(float duration, const Size& gridSize, unsigned int seed);
|
||||
void shuffle(unsigned int *pArray, unsigned int nLen);
|
||||
Size getDelta(const Size& pos) const;
|
||||
void placeTile(const Point& pos, Tile *t);
|
||||
|
@ -189,7 +189,7 @@ class CC_DLL TurnOffTiles : public TiledGrid3DAction
|
|||
public:
|
||||
~TurnOffTiles(void);
|
||||
/** initializes the action with a random seed, the grid size and the duration */
|
||||
virtual bool initWithDuration(float duration, const Size& gridSize, unsigned int seed);
|
||||
bool initWithDuration(float duration, const Size& gridSize, unsigned int seed);
|
||||
void shuffle(unsigned int *pArray, unsigned int nLen);
|
||||
void turnOnTile(const Point& pos);
|
||||
void turnOffTile(const Point& pos);
|
||||
|
@ -226,7 +226,7 @@ public:
|
|||
inline void setAmplitudeRate(float fAmplitudeRate) { _amplitudeRate = fAmplitudeRate; }
|
||||
|
||||
/** initializes the action with a number of waves, the waves amplitude, the grid size and the duration */
|
||||
virtual bool initWithDuration(float duration, const Size& gridSize, unsigned int waves, float amplitude);
|
||||
bool initWithDuration(float duration, const Size& gridSize, unsigned int waves, float amplitude);
|
||||
|
||||
/** returns a new clone of the action */
|
||||
virtual WavesTiles3D* clone() const;
|
||||
|
@ -279,7 +279,7 @@ class CC_DLL SplitRows : public TiledGrid3DAction
|
|||
{
|
||||
public :
|
||||
/** initializes the action with the number of rows to split and the duration */
|
||||
virtual bool initWithDuration(float duration, unsigned int nRows);
|
||||
bool initWithDuration(float duration, unsigned int nRows);
|
||||
|
||||
/** returns a new clone of the action */
|
||||
virtual SplitRows* clone() const;
|
||||
|
@ -301,7 +301,7 @@ class CC_DLL SplitCols : public TiledGrid3DAction
|
|||
{
|
||||
public:
|
||||
/** initializes the action with the number of columns to split and the duration */
|
||||
virtual bool initWithDuration(float duration, unsigned int nCols);
|
||||
bool initWithDuration(float duration, unsigned int nCols);
|
||||
|
||||
/** returns a new clone of the action */
|
||||
virtual SplitCols* clone() const;
|
||||
|
|
|
@ -237,9 +237,9 @@ public:
|
|||
|
||||
virtual bool init();
|
||||
/** initializes a Layer with color, width and height in Points */
|
||||
virtual bool initWithColor(const Color4B& color, GLfloat width, GLfloat height);
|
||||
bool initWithColor(const Color4B& color, GLfloat width, GLfloat height);
|
||||
/** initializes a Layer with color. Width and height are the window size. */
|
||||
virtual bool initWithColor(const Color4B& color);
|
||||
bool initWithColor(const Color4B& color);
|
||||
|
||||
/** change width in Points*/
|
||||
void changeWidth(GLfloat w);
|
||||
|
@ -300,10 +300,10 @@ public:
|
|||
|
||||
virtual bool init();
|
||||
/** Initializes the Layer with a gradient between start and end. */
|
||||
virtual bool initWithColor(const Color4B& start, const Color4B& end);
|
||||
bool initWithColor(const Color4B& start, const Color4B& end);
|
||||
|
||||
/** Initializes the Layer with a gradient between start and end in the direction of v. */
|
||||
virtual bool initWithColor(const Color4B& start, const Color4B& end, const Point& v);
|
||||
bool initWithColor(const Color4B& start, const Color4B& end, const Point& v);
|
||||
|
||||
/** Whether or not the interpolation will be compressed in order to display all the colors of the gradient both in canonical and non canonical vectors
|
||||
Default: YES
|
||||
|
|
|
@ -88,7 +88,7 @@ public:
|
|||
virtual ~TransitionScene();
|
||||
|
||||
/** initializes a transition with duration and incoming scene */
|
||||
virtual bool initWithDuration(float t,Scene* scene);
|
||||
bool initWithDuration(float t,Scene* scene);
|
||||
|
||||
/** called after the transition finishes */
|
||||
void finish(void);
|
||||
|
@ -131,7 +131,7 @@ public:
|
|||
virtual ~TransitionSceneOriented();
|
||||
|
||||
/** initializes a transition with duration and incoming scene */
|
||||
virtual bool initWithDuration(float t,Scene* scene,tOrientation orientation);
|
||||
bool initWithDuration(float t,Scene* scene,tOrientation orientation);
|
||||
|
||||
protected:
|
||||
tOrientation _orientation;
|
||||
|
@ -468,12 +468,12 @@ public:
|
|||
virtual ~TransitionFade();
|
||||
|
||||
/** initializes the transition with a duration and with an RGB color */
|
||||
virtual bool initWithDuration(float t, Scene*scene ,const Color3B& color);
|
||||
bool initWithDuration(float t, Scene*scene ,const Color3B& color);
|
||||
|
||||
//
|
||||
// Overrides
|
||||
//
|
||||
virtual bool initWithDuration(float t,Scene* scene);
|
||||
bool initWithDuration(float t,Scene* scene);
|
||||
virtual void onEnter();
|
||||
virtual void onExit();
|
||||
|
||||
|
|
|
@ -64,7 +64,7 @@ public:
|
|||
* If back is true then the effect is reversed to appear as if the incoming
|
||||
* scene is being turned from left over the outgoing scene.
|
||||
*/
|
||||
virtual bool initWithDuration(float t,Scene* scene,bool backwards);
|
||||
bool initWithDuration(float t,Scene* scene,bool backwards);
|
||||
|
||||
ActionInterval* actionWithSize(const Size& vector);
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ public:
|
|||
ParallaxNode();
|
||||
virtual ~ParallaxNode();
|
||||
|
||||
virtual void addChild(Node * child, int z, const Point& parallaxRatio, const Point& positionOffset);
|
||||
void addChild(Node * child, int z, const Point& parallaxRatio, const Point& positionOffset);
|
||||
|
||||
//
|
||||
// Overrides
|
||||
|
|
|
@ -60,7 +60,7 @@ public:
|
|||
void setEnalbedSelectors(int nValue);
|
||||
|
||||
/** initializes a TouchHandler with a delegate and a priority */
|
||||
virtual bool initWithDelegate(TouchDelegate *pDelegate, int nPriority);
|
||||
bool initWithDelegate(TouchDelegate *pDelegate, int nPriority);
|
||||
|
||||
public:
|
||||
/** allocates a TouchHandler with a delegate and a priority */
|
||||
|
@ -79,7 +79,7 @@ class CC_DLL StandardTouchHandler : public TouchHandler
|
|||
{
|
||||
public:
|
||||
/** initializes a TouchHandler with a delegate and a priority */
|
||||
virtual bool initWithDelegate(TouchDelegate *pDelegate, int nPriority);
|
||||
bool initWithDelegate(TouchDelegate *pDelegate, int nPriority);
|
||||
|
||||
public:
|
||||
/** allocates a TouchHandler with a delegate and a priority */
|
||||
|
|
|
@ -836,7 +836,7 @@ void ActionCallFuncND::onEnter()
|
|||
|
||||
auto action = Sequence::create(
|
||||
MoveBy::create(2.0f, Point(200,0)),
|
||||
CallFuncN::create( CC_CALLBACK_1(ActionCallFuncND::removeFromParentAndCleanup, this, true)),
|
||||
CallFuncN::create( CC_CALLBACK_1(ActionCallFuncND::doRemoveFromParentAndCleanup, this, true)),
|
||||
NULL);
|
||||
|
||||
_grossini->runAction(action);
|
||||
|
@ -852,7 +852,7 @@ std::string ActionCallFuncND::subtitle()
|
|||
return "simulates CallFuncND with std::bind()";
|
||||
}
|
||||
|
||||
void ActionCallFuncND::removeFromParentAndCleanup(Node* pSender, bool cleanup)
|
||||
void ActionCallFuncND::doRemoveFromParentAndCleanup(Node* pSender, bool cleanup)
|
||||
{
|
||||
_grossini->removeFromParentAndCleanup(cleanup);
|
||||
}
|
||||
|
|
|
@ -249,7 +249,7 @@ public:
|
|||
virtual void onEnter();
|
||||
virtual std::string title();
|
||||
virtual std::string subtitle();
|
||||
void removeFromParentAndCleanup(Node* pSender, bool cleanup);
|
||||
void doRemoveFromParentAndCleanup(Node* pSender, bool cleanup);
|
||||
};
|
||||
|
||||
class ActionCallFuncO : public ActionsDemo
|
||||
|
|
|
@ -132,7 +132,7 @@ public:
|
|||
_lens3D->setPosition(var);
|
||||
}
|
||||
|
||||
virtual const Point& getPosition()
|
||||
virtual const Point& getPosition() const
|
||||
{
|
||||
return _lens3D->getPosition();
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
4d44263fa75a5a31d1d0b09aad082e691f1391d2
|
||||
4a829fc84c7a38d95e536c8a26b4822bff188701
|
Loading…
Reference in New Issue