remove unneeded codes

This commit is contained in:
minggo 2013-11-26 16:52:00 +08:00
parent ba101809de
commit fcf43823b4
2 changed files with 1 additions and 39 deletions

View File

@ -267,32 +267,6 @@ bool Sprite::initWithTexture(Texture2D *texture, const Rect& rect, bool rotated)
}
}
// XXX: deprecated
/*
Sprite* Sprite::initWithCGImage(CGImageRef pImage)
{
// todo
// because it is deprecated, so we do not implement it
return NULL;
}
*/
/*
Sprite* Sprite::initWithCGImage(CGImageRef pImage, const char *pszKey)
{
CCASSERT(pImage != NULL);
// XXX: possible bug. See issue #349. New API should be added
Texture2D *texture = Director::getInstance()->getTextureCache()->addCGImage(pImage, pszKey);
const Size& size = texture->getContentSize();
Rect rect = Rect(0 ,0, size.width, size.height);
return initWithTexture(texture, rect);
}
*/
Sprite::Sprite(void)
: _shouldBeHidden(false)
, _texture(nullptr)
@ -685,16 +659,6 @@ void Sprite::draw(void)
// Node overrides
void Sprite::addChild(Node* child)
{
Node::addChild(child);
}
void Sprite::addChild(Node *child, int zOrder)
{
Node::addChild(child, zOrder);
}
void Sprite::addChild(Node *child, int zOrder, int tag)
{
CCASSERT(child != NULL, "Argument must be non-NULL");
@ -744,7 +708,6 @@ void Sprite::removeChild(Node *child, bool cleanup)
}
Node::removeChild(child, cleanup);
}
void Sprite::removeAllChildrenWithCleanup(bool cleanup)

View File

@ -412,8 +412,7 @@ public:
virtual void removeChild(Node* child, bool cleanup) override;
virtual void removeAllChildrenWithCleanup(bool cleanup) override;
virtual void reorderChild(Node *child, int zOrder) override;
virtual void addChild(Node *child) override;
virtual void addChild(Node *child, int zOrder) override;
using Node::addChild;
virtual void addChild(Node *child, int zOrder, int tag) override;
virtual void sortAllChildren() override;
virtual void setScale(float scale) override;