From a32bb8cd2321cc2dfa9075cf0b0a0237bd1b83ab Mon Sep 17 00:00:00 2001 From: "Huabing.Xu" Date: Wed, 16 Apr 2014 10:58:34 +0800 Subject: [PATCH] remove warning message---continue --- cocos/math/Matrix.cpp | 28 ++++++++++++++-------------- cocos/math/Vector3.cpp | 12 ++++++------ cocos/math/Vector3.h | 16 ++++++++-------- cocos/math/Vector4.cpp | 14 +++++++------- cocos/math/Vector4.h | 20 ++++++++++---------- 5 files changed, 45 insertions(+), 45 deletions(-) diff --git a/cocos/math/Matrix.cpp b/cocos/math/Matrix.cpp index b68197610c..875b2d9571 100644 --- a/cocos/math/Matrix.cpp +++ b/cocos/math/Matrix.cpp @@ -24,9 +24,9 @@ Matrix::Matrix(float m11, float m12, float m13, float m14, float m21, float m22, set(m11, m12, m13, m14, m21, m22, m23, m24, m31, m32, m33, m34, m41, m42, m43, m44); } -Matrix::Matrix(const float* m) +Matrix::Matrix(const float* mat) { - set(m); + set(mat); } Matrix::Matrix(const Matrix& copy) @@ -118,7 +118,7 @@ void Matrix::createPerspective(float fieldOfView, float aspectRatio, float theta = MATH_DEG_TO_RAD(fieldOfView) * 0.5f; if (fabs(fmod(theta, MATH_PIOVER2)) < MATH_EPSILON) { - CCLOGERROR("Invalid field of view value (%d) causes attempted calculation tan(%d), which is undefined.", fieldOfView, theta); + CCLOGERROR("Invalid field of view value (%f) causes attempted calculation tan(%f), which is undefined.", fieldOfView, theta); return; } float divisor = tan(theta); @@ -426,9 +426,9 @@ void Matrix::add(float scalar, Matrix* dst) MathUtil::addMatrix(m, scalar, dst->m); } -void Matrix::add(const Matrix& m) +void Matrix::add(const Matrix& mat) { - add(*this, m, this); + add(*this, mat, this); } void Matrix::add(const Matrix& m1, const Matrix& m2, Matrix* dst) @@ -710,9 +710,9 @@ void Matrix::multiply(const Matrix& m, float scalar, Matrix* dst) MathUtil::multiplyMatrix(m.m, scalar, dst->m); } -void Matrix::multiply(const Matrix& m) +void Matrix::multiply(const Matrix& mat) { - multiply(*this, m, this); + multiply(*this, mat, this); } void Matrix::multiply(const Matrix& m1, const Matrix& m2, Matrix* dst) @@ -847,15 +847,15 @@ void Matrix::set(float m11, float m12, float m13, float m14, float m21, float m2 m[15] = m44; } -void Matrix::set(const float* m) +void Matrix::set(const float* mat) { - GP_ASSERT(m); - memcpy(this->m, m, MATRIX_SIZE); + GP_ASSERT(mat); + memcpy(this->m, mat, MATRIX_SIZE); } -void Matrix::set(const Matrix& m) +void Matrix::set(const Matrix& mat) { - memcpy(this->m, m.m, MATRIX_SIZE); + memcpy(this->m, mat.m, MATRIX_SIZE); } void Matrix::setIdentity() @@ -868,9 +868,9 @@ void Matrix::setZero() memset(m, 0, MATRIX_SIZE); } -void Matrix::subtract(const Matrix& m) +void Matrix::subtract(const Matrix& mat) { - subtract(*this, m, this); + subtract(*this, mat, this); } void Matrix::subtract(const Matrix& m1, const Matrix& m2, Matrix* dst) diff --git a/cocos/math/Vector3.cpp b/cocos/math/Vector3.cpp index 400cb08622..9859b71da0 100644 --- a/cocos/math/Vector3.cpp +++ b/cocos/math/Vector3.cpp @@ -9,8 +9,8 @@ Vector3::Vector3() { } -Vector3::Vector3(float x, float y, float z) - : x(x), y(y), z(z) +Vector3::Vector3(float xx, float yy, float zz) + : x(xx), y(yy), z(zz) { } @@ -263,11 +263,11 @@ void Vector3::scale(float scalar) z *= scalar; } -void Vector3::set(float x, float y, float z) +void Vector3::set(float xx, float yy, float zz) { - this->x = x; - this->y = y; - this->z = z; + this->x = xx; + this->y = yy; + this->z = zz; } void Vector3::set(const float* array) diff --git a/cocos/math/Vector3.h b/cocos/math/Vector3.h index e27adb9821..57c77d0739 100644 --- a/cocos/math/Vector3.h +++ b/cocos/math/Vector3.h @@ -44,11 +44,11 @@ public: /** * Constructs a new vector initialized to the specified values. * - * @param x The x coordinate. - * @param y The y coordinate. - * @param z The z coordinate. + * @param xx The x coordinate. + * @param yy The y coordinate. + * @param zz The z coordinate. */ - Vector3(float x, float y, float z); + Vector3(float xx, float yy, float zz); /** * Constructs a new vector from the values in the specified array. @@ -305,11 +305,11 @@ public: /** * Sets the elements of this vector to the specified values. * - * @param x The new x coordinate. - * @param y The new y coordinate. - * @param z The new z coordinate. + * @param xx The new x coordinate. + * @param yy The new y coordinate. + * @param zz The new z coordinate. */ - void set(float x, float y, float z); + void set(float xx, float yy, float zz); /** * Sets the elements of this vector from the values in the specified array. diff --git a/cocos/math/Vector4.cpp b/cocos/math/Vector4.cpp index 7fab07b58e..72144dd53d 100644 --- a/cocos/math/Vector4.cpp +++ b/cocos/math/Vector4.cpp @@ -9,8 +9,8 @@ Vector4::Vector4() { } -Vector4::Vector4(float x, float y, float z, float w) - : x(x), y(y), z(z), w(w) +Vector4::Vector4(float xx, float yy, float zz, float ww) + : x(xx), y(yy), z(zz), w(ww) { } @@ -276,12 +276,12 @@ void Vector4::scale(float scalar) w *= scalar; } -void Vector4::set(float x, float y, float z, float w) +void Vector4::set(float xx, float yy, float zz, float ww) { - this->x = x; - this->y = y; - this->z = z; - this->w = w; + this->x = xx; + this->y = yy; + this->z = zz; + this->w = ww; } void Vector4::set(const float* array) diff --git a/cocos/math/Vector4.h b/cocos/math/Vector4.h index 493039cfe1..cde670e655 100644 --- a/cocos/math/Vector4.h +++ b/cocos/math/Vector4.h @@ -42,12 +42,12 @@ public: /** * Constructs a new vector initialized to the specified values. * - * @param x The x coordinate. - * @param y The y coordinate. - * @param z The z coordinate. - * @param w The w coordinate. + * @param xx The x coordinate. + * @param yy The y coordinate. + * @param zz The z coordinate. + * @param ww The w coordinate. */ - Vector4(float x, float y, float z, float w); + Vector4(float xx, float yy, float zz, float ww); /** * Constructs a new vector from the values in the specified array. @@ -296,12 +296,12 @@ public: /** * Sets the elements of this vector to the specified values. * - * @param x The new x coordinate. - * @param y The new y coordinate. - * @param z The new z coordinate. - * @param w The new w coordinate. + * @param xx The new x coordinate. + * @param yy The new y coordinate. + * @param zz The new z coordinate. + * @param ww The new w coordinate. */ - void set(float x, float y, float z, float w); + void set(float xx, float yy, float zz, float ww); /** * Sets the elements of this vector from the values in the specified array.