summaryrefslogtreecommitdiff
path: root/src/mbgl/util/mat4.cpp
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2015-05-01 09:52:59 -0400
committerJohn Firebaugh <john.firebaugh@gmail.com>2015-05-01 10:06:04 -0400
commit2d8d3753562bd81e3ff91e6493db2fcf33f1cb10 (patch)
tree72e519d88780a865344cc3f0fb6b8a878c0416c5 /src/mbgl/util/mat4.cpp
parentbb3eb8d83dfd64792697e385b4a5dfe374add395 (diff)
downloadqtlocation-mapboxgl-2d8d3753562bd81e3ff91e6493db2fcf33f1cb10.tar.gz
Fix intended identity comparisons
Diffstat (limited to 'src/mbgl/util/mat4.cpp')
-rw-r--r--src/mbgl/util/mat4.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mbgl/util/mat4.cpp b/src/mbgl/util/mat4.cpp
index 50270d9217..cabd8e2842 100644
--- a/src/mbgl/util/mat4.cpp
+++ b/src/mbgl/util/mat4.cpp
@@ -87,7 +87,7 @@ void matrix::copy(mat4& out, const mat4& a) {
}
void matrix::translate(mat4& out, const mat4& a, float x, float y, float z) {
- if (a == out) {
+ if (&a == &out) {
out[12] = a[0] * x + a[4] * y + a[8] * z + a[12];
out[13] = a[1] * x + a[5] * y + a[9] * z + a[13];
out[14] = a[2] * x + a[6] * y + a[10] * z + a[14];
@@ -124,7 +124,7 @@ void matrix::rotate_z(mat4& out, const mat4& a, float rad) {
a12 = a[6],
a13 = a[7];
- if (a != out) { // If the source and destination differ, copy the unchanged last row
+ if (&a != &out) { // If the source and destination differ, copy the unchanged last row
out[8] = a[8];
out[9] = a[9];
out[10] = a[10];