Skip to content

Commit

Permalink
COMMON: Remove explict copy-ctor and copy-op= from Matrix4x4
Browse files Browse the repository at this point in the history
The implict defaults work fine.
  • Loading branch information
DrMcCoy committed Oct 20, 2016
1 parent a373ffd commit d2e681c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 11 deletions.
9 changes: 0 additions & 9 deletions src/common/matrix4x4.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@ Matrix4x4::Matrix4x4(bool identity) {
loadIdentity();
}

Matrix4x4::Matrix4x4(const Matrix4x4 &m) {
std::memcpy(_elements, &m, 16 * sizeof(float));
}

Matrix4x4::Matrix4x4(const float *m) {
std::memcpy(_elements, m, 16 * sizeof(float));
}
Expand Down Expand Up @@ -639,11 +635,6 @@ void Matrix4x4::ortho(float l, float r, float b, float t, float n, float f)
this->transform(mMatrix);
}

const Matrix4x4 &Matrix4x4::operator=(const Matrix4x4 &m) {
std::memcpy(_elements, &m, 16 * sizeof(float));
return *this;
}

const Matrix4x4 &Matrix4x4::operator=(const float *m) {
std::memcpy(_elements, m, 16 * sizeof(float));
return *this;
Expand Down
2 changes: 0 additions & 2 deletions src/common/matrix4x4.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ class Matrix4x4 {
* assignment of transform internal array in some cases.
*/
Matrix4x4(bool identity = true);
Matrix4x4(const Matrix4x4 &m);
Matrix4x4(const float *m);
~Matrix4x4();

Expand Down Expand Up @@ -94,7 +93,6 @@ class Matrix4x4 {
void perspective(float fovy, float aspectRatio, float znear, float zfar);
void ortho(float l, float r, float b, float t, float n, float f);

const Matrix4x4 &operator=(const Matrix4x4 &m);
const Matrix4x4 &operator=(const float *m);

float &operator[](unsigned int index);
Expand Down

0 comments on commit d2e681c

Please sign in to comment.