Skip to content

remove redundant user-defined copy constructor and destructor #19636

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 25, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions cocos/3d/CCAABB.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,6 @@ AABB::AABB(const Vec3& min, const Vec3& max)
set(min, max);
}

AABB::AABB(const AABB& box)
{
set(box._min,box._max);
}

Vec3 AABB::getCenter()
{
Vec3 center;
Expand Down
5 changes: 0 additions & 5 deletions cocos/3d/CCAABB.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,6 @@ class CC_DLL AABB
*/
AABB(const Vec3& min, const Vec3& max);

/**
* Constructor.
*/
AABB(const AABB& box);

/**
* Gets the center point of the bounding box.
*/
Expand Down
12 changes: 0 additions & 12 deletions cocos/math/Vec2.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,18 +93,6 @@ class CC_DLL Vec2
*/
Vec2(const Vec2& p1, const Vec2& p2);

/**
* Constructs a new vector that is a copy of the specified vector.
*
* @param copy The vector to copy.
*/
Vec2(const Vec2& copy);

/**
* Destructor.
*/
~Vec2();

/**
* Indicates whether this vector contains all zeros.
*
Expand Down
9 changes: 0 additions & 9 deletions cocos/math/Vec2.inl
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,6 @@ inline Vec2::Vec2(const Vec2& p1, const Vec2& p2)
set(p1, p2);
}

inline Vec2::Vec2(const Vec2& copy)
{
set(copy);
}

inline Vec2::~Vec2()
{
}

inline bool Vec2::isZero() const
{
return x == 0.0f && y == 0.0f;
Expand Down
9 changes: 0 additions & 9 deletions cocos/math/Vec3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,6 @@ Vec3::Vec3(const Vec3& p1, const Vec3& p2)
set(p1, p2);
}

Vec3::Vec3(const Vec3& copy)
{
set(copy);
}

Vec3 Vec3::fromColor(unsigned int color)
{
float components[3];
Expand All @@ -65,10 +60,6 @@ Vec3 Vec3::fromColor(unsigned int color)
return value;
}

Vec3::~Vec3()
{
}

float Vec3::angle(const Vec3& v1, const Vec3& v2)
{
float dx = v1.y * v2.z - v1.z * v2.y;
Expand Down
12 changes: 0 additions & 12 deletions cocos/math/Vec3.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,6 @@ class CC_DLL Vec3
*/
Vec3(const Vec3& p1, const Vec3& p2);

/**
* Constructs a new vector that is a copy of the specified vector.
*
* @param copy The vector to copy.
*/
Vec3(const Vec3& copy);

/**
* Creates a new vector from an integer interpreted as an RGB value.
* E.g. 0xff0000 represents red or the vector (1, 0, 0).
Expand All @@ -110,11 +103,6 @@ class CC_DLL Vec3
*/
static Vec3 fromColor(unsigned int color);

/**
* Destructor.
*/
~Vec3();

/**
* Indicates whether this vector contains all zeros.
*
Expand Down