Merge pull request #7792 from minggo/fix-warning

fix warnings
This commit is contained in:
minggo 2014-08-15 13:33:08 +08:00
commit 38fb58cf29
6 changed files with 16 additions and 7 deletions

View File

@ -232,7 +232,7 @@ void Director::setDefaultValues(void)
// PVR v2 has alpha premultiplied ?
bool pvr_alpha_premultipled = conf->getValue("cocos2d.x.texture.pvrv2_has_alpha_premultiplied", Value(false)).asBool();
Texture2D::PVRImagesHavePremultipliedAlpha(pvr_alpha_premultipled);
Image::setPVRImagesHavePremultipliedAlpha(pvr_alpha_premultipled);
}
void Director::setGLDefaultValues()

View File

@ -181,10 +181,12 @@ public:
/**
* Provided to make scroll view compatible with SWLayer's pause method
*/
using Layer::pause; // fix warning
void pause(Ref* sender);
/**
* Provided to make scroll view compatible with SWLayer's resume method
*/
using Layer::resume; // fix warning
void resume(Ref* sender);
void setTouchEnabled(bool enabled);

View File

@ -630,7 +630,9 @@ public:
virtual std::string subtitle() const override;
virtual std::string title() const override;
using Layer::pause;
void pause(float dt);
using Layer::resume;
void resume(float dt);
private:
Vector<Node*> _pausedTargets;

View File

@ -230,7 +230,7 @@ void NodeCreateTest::initWithQuantityOfNodes(unsigned int nNodes)
{
PerformceAllocScene::initWithQuantityOfNodes(nNodes);
log("Size of Node: %u\n", sizeof(Node));
log("Size of Node: %lu\n", sizeof(Node));
scheduleUpdate();
}
@ -278,7 +278,7 @@ void NodeDeallocTest::initWithQuantityOfNodes(unsigned int nNodes)
{
PerformceAllocScene::initWithQuantityOfNodes(nNodes);
log("Size of Node: %u\n", sizeof(Node));
log("Size of Node: %lu\n", sizeof(Node));
scheduleUpdate();
}
@ -331,7 +331,7 @@ void SpriteCreateEmptyTest::initWithQuantityOfNodes(unsigned int nNodes)
{
PerformceAllocScene::initWithQuantityOfNodes(nNodes);
log("Size of Sprite: %u\n", sizeof(Sprite));
log("Size of Sprite: %lu\n", sizeof(Sprite));
scheduleUpdate();
}
@ -381,7 +381,7 @@ void SpriteCreateTest::initWithQuantityOfNodes(unsigned int nNodes)
{
PerformceAllocScene::initWithQuantityOfNodes(nNodes);
log("Size of Sprite: %u\n", sizeof(Sprite));
log("Size of Sprite: %lu\n", sizeof(Sprite));
scheduleUpdate();
}
@ -431,7 +431,7 @@ void SpriteDeallocTest::initWithQuantityOfNodes(unsigned int nNodes)
{
PerformceAllocScene::initWithQuantityOfNodes(nNodes);
log("Size of sprite: %u\n", sizeof(Sprite));
log("Size of sprite: %lu\n", sizeof(Sprite));
scheduleUpdate();
}

View File

@ -156,7 +156,7 @@ void PerformanceContainerScene::initWithQuantityOfNodes(unsigned int nNodes)
addChild(menuLayer);
menuLayer->release();
log("Size of Node: %u\n", sizeof(Node));
log("Size of Node: %d\n", (int)sizeof(Node));
int oldFontSize = MenuItemFont::getFontSize();
MenuItemFont::setFontSize(24);

View File

@ -47,6 +47,7 @@ public:
void tick1(float dt);
void tick2(float dt);
using SchedulerTestLayer::pause;
void pause(float dt);
};
@ -65,7 +66,9 @@ public:
void tick1(float dt);
void tick2(float dt);
using SchedulerTestLayer::pause;
void pause(float dt);
using SchedulerTestLayer::resume;
void resume(float dt);
private:
std::set<void*> _pausedTargets;
@ -85,7 +88,9 @@ public:
void tick1(float dt);
void tick2(float dt);
using SchedulerTestLayer::pause;
void pause(float dt);
using SchedulerTestLayer::resume;
void resume(float dt);
private:
std::set<void*> _pausedTargets;