From 18466d4ae4048af1101624826080c11dbe8a5953 Mon Sep 17 00:00:00 2001 From: Georg Lehmann Date: Sat, 27 Mar 2021 16:04:31 +0100 Subject: [PATCH] [util] remove some movs in matrix add/sub assignment --- src/util/util_matrix.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/util/util_matrix.cpp b/src/util/util_matrix.cpp index 8aa50b98..2c5e9314 100644 --- a/src/util/util_matrix.cpp +++ b/src/util/util_matrix.cpp @@ -80,11 +80,15 @@ namespace dxvk { } Matrix4& Matrix4::operator+=(const Matrix4& other) { - return (*this = (*this) + other); + for (uint32_t i = 0; i < 4; i++) + data[i] += other.data[i]; + return *this; } Matrix4& Matrix4::operator-=(const Matrix4& other) { - return (*this = (*this) - other); + for (uint32_t i = 0; i < 4; i++) + data[i] -= other.data[i]; + return *this; } Matrix4& Matrix4::operator*=(const Matrix4& other) {