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);
|
virtual void startWithTarget(Node *pTarget);
|
||||||
|
|
||||||
/** initializes the action with size and duration */
|
/** 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 */
|
/** returns the grid */
|
||||||
virtual GridBase* getGrid(void);
|
virtual GridBase* getGrid(void);
|
||||||
|
|
|
@ -68,7 +68,7 @@ class CC_DLL FlipX3D : public Grid3DAction
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/** initializes the action with duration */
|
/** initializes the action with duration */
|
||||||
virtual bool initWithDuration(float duration);
|
bool initWithDuration(float duration);
|
||||||
virtual bool initWithSize(const Size& gridSize, float duration);
|
virtual bool initWithSize(const Size& gridSize, float duration);
|
||||||
|
|
||||||
/** returns a new clone of the action */
|
/** returns a new clone of the action */
|
||||||
|
|
|
@ -250,14 +250,14 @@ public:
|
||||||
virtual ~CallFunc();
|
virtual ~CallFunc();
|
||||||
|
|
||||||
/** initializes the action with the callback
|
/** initializes the action with the callback
|
||||||
|
|
||||||
typedef void (Object::*SEL_CallFunc)();
|
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()>
|
/** 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 */
|
/** executes the callback */
|
||||||
virtual void execute();
|
virtual void execute();
|
||||||
|
@ -329,14 +329,14 @@ public:
|
||||||
|
|
||||||
/** initializes the action with the std::function<void(Node*)>
|
/** 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
|
/** initializes the action with the callback
|
||||||
|
|
||||||
typedef void (Object::*SEL_CallFuncN)(Node*);
|
typedef void (Object::*SEL_CallFuncN)(Node*);
|
||||||
@deprecated Use the std::function API instead.
|
@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() {
|
virtual long getClassTypeInfo() {
|
||||||
static const long id = cocos2d::getHashCodeByString(typeid(cocos2d::CallFunc).name());
|
static const long id = cocos2d::getHashCodeByString(typeid(cocos2d::CallFunc).name());
|
||||||
|
|
|
@ -266,7 +266,7 @@ public:
|
||||||
/** initializes the action */
|
/** initializes the action */
|
||||||
bool initWithDuration(float fDuration, float fDeltaAngle);
|
bool initWithDuration(float fDuration, float fDeltaAngle);
|
||||||
|
|
||||||
virtual bool initWithDuration(float fDuration, float fDeltaAngleX, float fDeltaAngleY);
|
bool initWithDuration(float fDuration, float fDeltaAngleX, float fDeltaAngleY);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Overrides
|
// Overrides
|
||||||
|
@ -378,7 +378,7 @@ public:
|
||||||
static SkewTo* create(float t, float sx, float sy);
|
static SkewTo* create(float t, float sx, float sy);
|
||||||
|
|
||||||
SkewTo();
|
SkewTo();
|
||||||
virtual bool initWithDuration(float t, float sx, float sy);
|
bool initWithDuration(float t, float sx, float sy);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Overrides
|
// Overrides
|
||||||
|
@ -408,7 +408,7 @@ public:
|
||||||
/** creates the action */
|
/** creates the action */
|
||||||
static SkewBy* create(float t, float deltaSkewX, float deltaSkewY);
|
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
|
// Overrides
|
||||||
|
|
|
@ -39,7 +39,7 @@ class CC_DLL ShakyTiles3D : public TiledGrid3DAction
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/** initializes the action with a range, whether or not to shake Z vertices, a grid size, and duration */
|
/** 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 */
|
/** returns a new clone of the action */
|
||||||
virtual ShakyTiles3D* clone() const;
|
virtual ShakyTiles3D* clone() const;
|
||||||
|
@ -61,7 +61,7 @@ class CC_DLL ShatteredTiles3D : public TiledGrid3DAction
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/** initializes the action with a range, whether or not to shatter Z vertices, a grid size and duration */
|
/** 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 */
|
/** returns a new clone of the action */
|
||||||
virtual ShatteredTiles3D* clone() const;
|
virtual ShatteredTiles3D* clone() const;
|
||||||
|
@ -87,7 +87,7 @@ class CC_DLL ShuffleTiles : public TiledGrid3DAction
|
||||||
public:
|
public:
|
||||||
~ShuffleTiles(void);
|
~ShuffleTiles(void);
|
||||||
/** initializes the action with a random seed, the grid size and the duration */
|
/** 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 shuffle(unsigned int *pArray, unsigned int nLen);
|
||||||
Size getDelta(const Size& pos) const;
|
Size getDelta(const Size& pos) const;
|
||||||
void placeTile(const Point& pos, Tile *t);
|
void placeTile(const Point& pos, Tile *t);
|
||||||
|
@ -189,7 +189,7 @@ class CC_DLL TurnOffTiles : public TiledGrid3DAction
|
||||||
public:
|
public:
|
||||||
~TurnOffTiles(void);
|
~TurnOffTiles(void);
|
||||||
/** initializes the action with a random seed, the grid size and the duration */
|
/** 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 shuffle(unsigned int *pArray, unsigned int nLen);
|
||||||
void turnOnTile(const Point& pos);
|
void turnOnTile(const Point& pos);
|
||||||
void turnOffTile(const Point& pos);
|
void turnOffTile(const Point& pos);
|
||||||
|
@ -226,7 +226,7 @@ public:
|
||||||
inline void setAmplitudeRate(float fAmplitudeRate) { _amplitudeRate = fAmplitudeRate; }
|
inline void setAmplitudeRate(float fAmplitudeRate) { _amplitudeRate = fAmplitudeRate; }
|
||||||
|
|
||||||
/** initializes the action with a number of waves, the waves amplitude, the grid size and the duration */
|
/** 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 */
|
/** returns a new clone of the action */
|
||||||
virtual WavesTiles3D* clone() const;
|
virtual WavesTiles3D* clone() const;
|
||||||
|
@ -279,7 +279,7 @@ class CC_DLL SplitRows : public TiledGrid3DAction
|
||||||
{
|
{
|
||||||
public :
|
public :
|
||||||
/** initializes the action with the number of rows to split and the duration */
|
/** 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 */
|
/** returns a new clone of the action */
|
||||||
virtual SplitRows* clone() const;
|
virtual SplitRows* clone() const;
|
||||||
|
@ -301,7 +301,7 @@ class CC_DLL SplitCols : public TiledGrid3DAction
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/** initializes the action with the number of columns to split and the duration */
|
/** 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 */
|
/** returns a new clone of the action */
|
||||||
virtual SplitCols* clone() const;
|
virtual SplitCols* clone() const;
|
||||||
|
|
|
@ -237,9 +237,9 @@ public:
|
||||||
|
|
||||||
virtual bool init();
|
virtual bool init();
|
||||||
/** initializes a Layer with color, width and height in Points */
|
/** 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. */
|
/** 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*/
|
/** change width in Points*/
|
||||||
void changeWidth(GLfloat w);
|
void changeWidth(GLfloat w);
|
||||||
|
@ -300,10 +300,10 @@ public:
|
||||||
|
|
||||||
virtual bool init();
|
virtual bool init();
|
||||||
/** Initializes the Layer with a gradient between start and end. */
|
/** 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. */
|
/** 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
|
/** 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
|
Default: YES
|
||||||
|
|
|
@ -88,7 +88,7 @@ public:
|
||||||
virtual ~TransitionScene();
|
virtual ~TransitionScene();
|
||||||
|
|
||||||
/** initializes a transition with duration and incoming scene */
|
/** 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 */
|
/** called after the transition finishes */
|
||||||
void finish(void);
|
void finish(void);
|
||||||
|
@ -131,7 +131,7 @@ public:
|
||||||
virtual ~TransitionSceneOriented();
|
virtual ~TransitionSceneOriented();
|
||||||
|
|
||||||
/** initializes a transition with duration and incoming scene */
|
/** 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:
|
protected:
|
||||||
tOrientation _orientation;
|
tOrientation _orientation;
|
||||||
|
@ -468,12 +468,12 @@ public:
|
||||||
virtual ~TransitionFade();
|
virtual ~TransitionFade();
|
||||||
|
|
||||||
/** initializes the transition with a duration and with an RGB color */
|
/** 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
|
// Overrides
|
||||||
//
|
//
|
||||||
virtual bool initWithDuration(float t,Scene* scene);
|
bool initWithDuration(float t,Scene* scene);
|
||||||
virtual void onEnter();
|
virtual void onEnter();
|
||||||
virtual void onExit();
|
virtual void onExit();
|
||||||
|
|
||||||
|
|
|
@ -64,7 +64,7 @@ public:
|
||||||
* If back is true then the effect is reversed to appear as if the incoming
|
* 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.
|
* 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);
|
ActionInterval* actionWithSize(const Size& vector);
|
||||||
|
|
||||||
|
|
|
@ -56,7 +56,7 @@ public:
|
||||||
ParallaxNode();
|
ParallaxNode();
|
||||||
virtual ~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
|
// Overrides
|
||||||
|
|
|
@ -60,7 +60,7 @@ public:
|
||||||
void setEnalbedSelectors(int nValue);
|
void setEnalbedSelectors(int nValue);
|
||||||
|
|
||||||
/** initializes a TouchHandler with a delegate and a priority */
|
/** initializes a TouchHandler with a delegate and a priority */
|
||||||
virtual bool initWithDelegate(TouchDelegate *pDelegate, int nPriority);
|
bool initWithDelegate(TouchDelegate *pDelegate, int nPriority);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/** allocates a TouchHandler with a delegate and a priority */
|
/** allocates a TouchHandler with a delegate and a priority */
|
||||||
|
@ -79,7 +79,7 @@ class CC_DLL StandardTouchHandler : public TouchHandler
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/** initializes a TouchHandler with a delegate and a priority */
|
/** initializes a TouchHandler with a delegate and a priority */
|
||||||
virtual bool initWithDelegate(TouchDelegate *pDelegate, int nPriority);
|
bool initWithDelegate(TouchDelegate *pDelegate, int nPriority);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/** allocates a TouchHandler with a delegate and a priority */
|
/** allocates a TouchHandler with a delegate and a priority */
|
||||||
|
|
|
@ -836,7 +836,7 @@ void ActionCallFuncND::onEnter()
|
||||||
|
|
||||||
auto action = Sequence::create(
|
auto action = Sequence::create(
|
||||||
MoveBy::create(2.0f, Point(200,0)),
|
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);
|
NULL);
|
||||||
|
|
||||||
_grossini->runAction(action);
|
_grossini->runAction(action);
|
||||||
|
@ -852,7 +852,7 @@ std::string ActionCallFuncND::subtitle()
|
||||||
return "simulates CallFuncND with std::bind()";
|
return "simulates CallFuncND with std::bind()";
|
||||||
}
|
}
|
||||||
|
|
||||||
void ActionCallFuncND::removeFromParentAndCleanup(Node* pSender, bool cleanup)
|
void ActionCallFuncND::doRemoveFromParentAndCleanup(Node* pSender, bool cleanup)
|
||||||
{
|
{
|
||||||
_grossini->removeFromParentAndCleanup(cleanup);
|
_grossini->removeFromParentAndCleanup(cleanup);
|
||||||
}
|
}
|
||||||
|
|
|
@ -249,7 +249,7 @@ public:
|
||||||
virtual void onEnter();
|
virtual void onEnter();
|
||||||
virtual std::string title();
|
virtual std::string title();
|
||||||
virtual std::string subtitle();
|
virtual std::string subtitle();
|
||||||
void removeFromParentAndCleanup(Node* pSender, bool cleanup);
|
void doRemoveFromParentAndCleanup(Node* pSender, bool cleanup);
|
||||||
};
|
};
|
||||||
|
|
||||||
class ActionCallFuncO : public ActionsDemo
|
class ActionCallFuncO : public ActionsDemo
|
||||||
|
|
|
@ -132,7 +132,7 @@ public:
|
||||||
_lens3D->setPosition(var);
|
_lens3D->setPosition(var);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual const Point& getPosition()
|
virtual const Point& getPosition() const
|
||||||
{
|
{
|
||||||
return _lens3D->getPosition();
|
return _lens3D->getPosition();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
4d44263fa75a5a31d1d0b09aad082e691f1391d2
|
4a829fc84c7a38d95e536c8a26b4822bff188701
|
Loading…
Reference in New Issue