mirror of https://github.com/axmolengine/axmol.git
Adds virtual destructors on Interfaces
Classes with at least one virtual function needs a virtual destructor. This patch adds virtual destructors to Interface classes And also enables 'warn on missing virtual destructors'
This commit is contained in:
parent
340544c42d
commit
0d750cdbaf
|
@ -1 +1 @@
|
||||||
1dbcea49018d245ac72bf4138633f3905ef4dc7f
|
0d9ce76f7e63d75718c38b1137b2580e19d0db76
|
|
@ -42,6 +42,9 @@ struct LetterInfo
|
||||||
class CC_DLL LabelTextFormatProtocol
|
class CC_DLL LabelTextFormatProtocol
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
virtual ~LabelTextFormatProtocol() {}
|
||||||
|
|
||||||
virtual bool recordLetterInfo(const cocos2d::Point& point,unsigned short int theChar, int spriteIndex) = 0;
|
virtual bool recordLetterInfo(const cocos2d::Point& point,unsigned short int theChar, int spriteIndex) = 0;
|
||||||
virtual bool recordPlaceholderInfo(int spriteIndex) = 0;
|
virtual bool recordPlaceholderInfo(int spriteIndex) = 0;
|
||||||
virtual std::vector<LetterInfo> *getLettersInfo() = 0;
|
virtual std::vector<LetterInfo> *getLettersInfo() = 0;
|
||||||
|
@ -71,7 +74,6 @@ public:
|
||||||
virtual bool breakLineWithoutSpace() const = 0;
|
virtual bool breakLineWithoutSpace() const = 0;
|
||||||
virtual cocos2d::Size getLabelContentSize() const = 0;
|
virtual cocos2d::Size getLabelContentSize() const = 0;
|
||||||
virtual void setLabelContentSize(const Size &newSize) = 0;
|
virtual void setLabelContentSize(const Size &newSize) = 0;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
NS_CC_END
|
NS_CC_END
|
||||||
|
|
|
@ -38,6 +38,8 @@ NS_CC_BEGIN
|
||||||
class CC_DLL RGBAProtocol
|
class CC_DLL RGBAProtocol
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
virtual ~RGBAProtocol() {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Changes the color with R,G,B bytes
|
* Changes the color with R,G,B bytes
|
||||||
*
|
*
|
||||||
|
@ -165,6 +167,8 @@ public:
|
||||||
class CC_DLL BlendProtocol
|
class CC_DLL BlendProtocol
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
virtual ~BlendProtocol() {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the source blending function.
|
* Sets the source blending function.
|
||||||
*
|
*
|
||||||
|
@ -197,6 +201,7 @@ public:
|
||||||
class CC_DLL TextureProtocol : public BlendProtocol
|
class CC_DLL TextureProtocol : public BlendProtocol
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
virtual ~TextureProtocol() {}
|
||||||
/**
|
/**
|
||||||
* Returns the currently used texture
|
* Returns the currently used texture
|
||||||
*
|
*
|
||||||
|
@ -222,6 +227,8 @@ public:
|
||||||
class CC_DLL LabelProtocol
|
class CC_DLL LabelProtocol
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
virtual ~LabelProtocol() {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets a new label using a string
|
* Sets a new label using a string
|
||||||
*
|
*
|
||||||
|
@ -247,6 +254,8 @@ public:
|
||||||
class CC_DLL DirectorDelegate
|
class CC_DLL DirectorDelegate
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
virtual ~DirectorDelegate() {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Will be called by Director when the projection is updated, and "custom" projection is used
|
* Will be called by Director when the projection is updated, and "custom" projection is used
|
||||||
* @js NA
|
* @js NA
|
||||||
|
|
|
@ -40,6 +40,8 @@ class TextFieldTTF;
|
||||||
class CC_DLL TextFieldDelegate
|
class CC_DLL TextFieldDelegate
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
virtual ~TextFieldDelegate() {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@brief If the sender doesn't want to attach to the IME, return true;
|
@brief If the sender doesn't want to attach to the IME, return true;
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -50,6 +50,8 @@ class Node;
|
||||||
class CC_DLL TransitionEaseScene// : public Object
|
class CC_DLL TransitionEaseScene// : public Object
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
virtual ~TransitionEaseScene() {}
|
||||||
|
|
||||||
/** returns the Ease action that will be performed on a linear action.
|
/** returns the Ease action that will be performed on a linear action.
|
||||||
@since v0.8.2
|
@since v0.8.2
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -39,6 +39,8 @@ typedef unsigned char CC_XML_CHAR;
|
||||||
class CC_DLL SAXDelegator
|
class CC_DLL SAXDelegator
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
virtual ~SAXDelegator() {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @js NA
|
* @js NA
|
||||||
* @lua NA
|
* @lua NA
|
||||||
|
|
|
@ -13,6 +13,7 @@ namespace cocosbuilder {
|
||||||
class CCBAnimationManagerDelegate
|
class CCBAnimationManagerDelegate
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
virtual ~CCBAnimationManagerDelegate() {}
|
||||||
virtual void completedAnimationSequenceNamed(const char *name) = 0;
|
virtual void completedAnimationSequenceNamed(const char *name) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -31,6 +31,9 @@ namespace gui {
|
||||||
|
|
||||||
class UIScrollInterface
|
class UIScrollInterface
|
||||||
{
|
{
|
||||||
|
public:
|
||||||
|
virtual ~UIScrollInterface() {}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void handlePressLogic(const cocos2d::Point &touchPoint) = 0;
|
virtual void handlePressLogic(const cocos2d::Point &touchPoint) = 0;
|
||||||
virtual void handleMoveLogic(const cocos2d::Point &touchPoint) = 0;
|
virtual void handleMoveLogic(const cocos2d::Point &touchPoint) = 0;
|
||||||
|
|
Loading…
Reference in New Issue