Skip to content

Commit 0b38939

Browse files
committed
remove compile warnings
1 parent 090f81b commit 0b38939

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

tests/cpp-tests/Classes/Sprite3DTest/Sprite3DTest.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -144,14 +144,14 @@ Sprite3D1::Sprite3D1()
144144
_eventDispatcher->addEventListenerWithSceneGraphPriority(listener, this);
145145

146146
auto s = Director::getInstance()->getWinSize();
147-
addNewSpriteWithCoords( Point(s.width/2, s.height/2) );
147+
addNewSpriteWithCoords( Vector2(s.width/2, s.height/2) );
148148
}
149149

150-
void Sprite3D1::addNewSpriteWithCoords(Point p)
150+
void Sprite3D1::addNewSpriteWithCoords(Vector2 p)
151151
{
152-
int idx = (int)(CCRANDOM_0_1() * 1400.0f / 100.0f);
153-
int x = (idx%5) * 85;
154-
int y = (idx/5) * 121;
152+
//int idx = (int)(CCRANDOM_0_1() * 1400.0f / 100.0f);
153+
//int x = (idx%5) * 85;
154+
//int y = (idx/5) * 121;
155155

156156
// //option 1: load a obj that contain the texture in it
157157
// auto sprite = Sprite3D::create("sprite3dTest/scene01.obj");
@@ -175,7 +175,7 @@ void Sprite3D1::addNewSpriteWithCoords(Point p)
175175
//add to scene
176176
addChild( sprite );
177177

178-
sprite->setPosition( Point( p.x, p.y) );
178+
sprite->setPosition( Vector2( p.x, p.y) );
179179

180180
ActionInterval* action;
181181
float random = CCRANDOM_0_1();

tests/cpp-tests/Classes/Sprite3DTest/Sprite3DTest.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class Sprite3D1 : public Sprite3DTestDemo
5757
virtual std::string title() const override;
5858
virtual std::string subtitle() const override;
5959

60-
void addNewSpriteWithCoords(Point p);
60+
void addNewSpriteWithCoords(Vector2 p);
6161
void onTouchesEnded(const std::vector<Touch*>& touches, Event* event);
6262
};
6363

0 commit comments

Comments
 (0)