mirror of https://github.com/axmolengine/axmol.git
Merge pull request #2074 from minggo/iss1686-synchronize
issue #1686:add () in defining a macro in RenderTextureTest.cpp
This commit is contained in:
commit
473538f6a8
|
@ -23,10 +23,10 @@ static NEWTESTFUNC createFunctions[] = {
|
|||
CF(SpriteRenderTextureBug),
|
||||
};
|
||||
|
||||
#define MAX_LAYER sizeof(createFunctions)/sizeof(createFunctions[0])
|
||||
#define MAX_LAYER (sizeof(createFunctions)/sizeof(createFunctions[0]))
|
||||
static int sceneIdx = -1;
|
||||
|
||||
CCLayer* nextTestCase()
|
||||
static CCLayer* nextTestCase()
|
||||
{
|
||||
sceneIdx++;
|
||||
sceneIdx = sceneIdx % MAX_LAYER;
|
||||
|
@ -37,7 +37,7 @@ CCLayer* nextTestCase()
|
|||
return pLayer;
|
||||
}
|
||||
|
||||
CCLayer* backTestCase()
|
||||
static CCLayer* backTestCase()
|
||||
{
|
||||
sceneIdx--;
|
||||
int total = MAX_LAYER;
|
||||
|
@ -50,7 +50,7 @@ CCLayer* backTestCase()
|
|||
return pLayer;
|
||||
}
|
||||
|
||||
CCLayer* restartTestCase()
|
||||
static CCLayer* restartTestCase()
|
||||
{
|
||||
CCLayer* pLayer = (createFunctions[sceneIdx])();
|
||||
pLayer->autorelease();
|
||||
|
|
Loading…
Reference in New Issue