From b541c81ba30fda4ef5de885da2b5ea3c3000ab1d Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sun, 17 Nov 2013 13:27:33 -0800 Subject: [PATCH] Clean up Mat3x3 etc. constness. --- GPU/GLES/TransformPipeline.cpp | 6 +++--- GPU/Math3D.h | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/GPU/GLES/TransformPipeline.cpp b/GPU/GLES/TransformPipeline.cpp index 0d5305ceb3..cc11a64530 100644 --- a/GPU/GLES/TransformPipeline.cpp +++ b/GPU/GLES/TransformPipeline.cpp @@ -919,9 +919,9 @@ bool TransformDrawEngine::GetCurrentSimpleVertices(int count, std::vector world_matrix(gstate.worldMatrix); - Mat3x3 view_matrix(gstate.viewMatrix); - Mat4x4 projection_matrix(gstate.projMatrix); + const Mat3x3 world_matrix(gstate.worldMatrix); + const Mat3x3 view_matrix(gstate.viewMatrix); + const Mat4x4 projection_matrix(gstate.projMatrix); vertices.resize(indexUpperBound + 1); for (int i = indexLowerBound; i <= indexUpperBound; ++i) { diff --git a/GPU/Math3D.h b/GPU/Math3D.h index 3eca3420bc..d29d0f0c9a 100644 --- a/GPU/Math3D.h +++ b/GPU/Math3D.h @@ -530,7 +530,7 @@ public: } template - Vec3 operator * (const Vec3& vec) + Vec3 operator * (const Vec3& vec) const { Vec3 ret; ret.x = values[0]*vec.x + values[3]*vec.y + values[6]*vec.z; @@ -539,7 +539,7 @@ public: return ret; } - Mat3x3 Inverse() + Mat3x3 Inverse() const { float a = values[0]; float b = values[1]; @@ -555,7 +555,7 @@ public: b*f-c*e, c*d-a*f, a*e-b*d) / Det(); } - BaseType Det() + BaseType Det() const { return values[0]*values[4]*values[8] + values[3]*values[7]*values[2] + values[6]*values[1]*values[5] - values[2]*values[4]*values[6] - @@ -588,7 +588,7 @@ public: } template - Vec4 operator * (const Vec4& vec) + Vec4 operator * (const Vec4& vec) const { Vec4 ret; ret.x = values[0]*vec.x + values[4]*vec.y + values[8]*vec.z + values[12]*vec.w;