Skip to content

Commit d89f1d0

Browse files
JohnCoconutminggo
authored andcommitted
remove redundant user-defined copy constructor and destructor, (cocos2d#19638)
as compiler auto-generated ones are working fine.
1 parent 22a43fb commit d89f1d0

File tree

6 files changed

+0
-52
lines changed

6 files changed

+0
-52
lines changed

cocos/3d/CCAABB.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,6 @@ AABB::AABB(const Vec3& min, const Vec3& max)
3737
set(min, max);
3838
}
3939

40-
AABB::AABB(const AABB& box)
41-
{
42-
set(box._min,box._max);
43-
}
44-
4540
Vec3 AABB::getCenter()
4641
{
4742
Vec3 center;

cocos/3d/CCAABB.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,6 @@ class CC_DLL AABB
5555
*/
5656
AABB(const Vec3& min, const Vec3& max);
5757

58-
/**
59-
* Constructor.
60-
*/
61-
AABB(const AABB& box);
62-
6358
/**
6459
* Gets the center point of the bounding box.
6560
*/

cocos/math/Vec2.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -93,18 +93,6 @@ class CC_DLL Vec2
9393
*/
9494
Vec2(const Vec2& p1, const Vec2& p2);
9595

96-
/**
97-
* Constructs a new vector that is a copy of the specified vector.
98-
*
99-
* @param copy The vector to copy.
100-
*/
101-
Vec2(const Vec2& copy);
102-
103-
/**
104-
* Destructor.
105-
*/
106-
~Vec2();
107-
10896
/**
10997
* Indicates whether this vector contains all zeros.
11098
*

cocos/math/Vec2.inl

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,6 @@ inline Vec2::Vec2(const Vec2& p1, const Vec2& p2)
4242
set(p1, p2);
4343
}
4444

45-
inline Vec2::Vec2(const Vec2& copy)
46-
{
47-
set(copy);
48-
}
49-
50-
inline Vec2::~Vec2()
51-
{
52-
}
53-
5445
inline bool Vec2::isZero() const
5546
{
5647
return x == 0.0f && y == 0.0f;

cocos/math/Vec3.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,6 @@ Vec3::Vec3(const Vec3& p1, const Vec3& p2)
4545
set(p1, p2);
4646
}
4747

48-
Vec3::Vec3(const Vec3& copy)
49-
{
50-
set(copy);
51-
}
52-
5348
Vec3 Vec3::fromColor(unsigned int color)
5449
{
5550
float components[3];
@@ -65,10 +60,6 @@ Vec3 Vec3::fromColor(unsigned int color)
6560
return value;
6661
}
6762

68-
Vec3::~Vec3()
69-
{
70-
}
71-
7263
float Vec3::angle(const Vec3& v1, const Vec3& v2)
7364
{
7465
float dx = v1.y * v2.z - v1.z * v2.y;

cocos/math/Vec3.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,6 @@ class CC_DLL Vec3
9393
*/
9494
Vec3(const Vec3& p1, const Vec3& p2);
9595

96-
/**
97-
* Constructs a new vector that is a copy of the specified vector.
98-
*
99-
* @param copy The vector to copy.
100-
*/
101-
Vec3(const Vec3& copy);
102-
10396
/**
10497
* Creates a new vector from an integer interpreted as an RGB value.
10598
* E.g. 0xff0000 represents red or the vector (1, 0, 0).
@@ -110,11 +103,6 @@ class CC_DLL Vec3
110103
*/
111104
static Vec3 fromColor(unsigned int color);
112105

113-
/**
114-
* Destructor.
115-
*/
116-
~Vec3();
117-
118106
/**
119107
* Indicates whether this vector contains all zeros.
120108
*

0 commit comments

Comments
 (0)