From 7e1a260286f4fbf8f7e335108604182adbc32f0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 16 Apr 2012 18:14:30 +0200 Subject: [PATCH] Removed && and std::forward from Matrix and Vector constructors. Types saved inside Matrix and Vector will be at most time smaller than or the same size as references to them, so no move semantic and forwarding is necessary. --- src/Math/Matrix.h | 4 ++-- src/Math/Matrix3.h | 4 ++-- src/Math/Matrix4.h | 2 +- src/Math/Vector.h | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Math/Matrix.h b/src/Math/Matrix.h index 743df7192..28714b6a5 100644 --- a/src/Math/Matrix.h +++ b/src/Math/Matrix.h @@ -70,9 +70,9 @@ template class Matrix { * Note that the values are in column-major order. */ #ifndef DOXYGEN_GENERATING_OUTPUT - template inline constexpr Matrix(T first, U&&... next): _data{first, std::forward(next)...} {} + template inline constexpr Matrix(T first, U... next): _data{first, next...} {} #else - template inline constexpr Matrix(T first, U&&... next); + template inline constexpr Matrix(T first, U... next); #endif /** @brief Copy constructor */ diff --git a/src/Math/Matrix3.h b/src/Math/Matrix3.h index fab6ea6ef..61a64af80 100644 --- a/src/Math/Matrix3.h +++ b/src/Math/Matrix3.h @@ -47,9 +47,9 @@ template class Matrix3: public Matrix { /** @copydoc Matrix::Matrix(T, U&&...) */ #ifndef DOXYGEN_GENERATING_OUTPUT - template inline constexpr Matrix3(T first, U&&... next): Matrix(first, std::forward(next)...) {} + template inline constexpr Matrix3(T first, U... next): Matrix(first, next...) {} #else - template inline constexpr Matrix3(T first, U&&... next) {} + template inline constexpr Matrix3(T first, U... next) {} #endif /** @copydoc Matrix::Matrix(const Matrix&) */ diff --git a/src/Math/Matrix4.h b/src/Math/Matrix4.h index 4a2f15164..c31624f38 100644 --- a/src/Math/Matrix4.h +++ b/src/Math/Matrix4.h @@ -116,7 +116,7 @@ template class Matrix4: public Matrix { /** @copydoc Matrix::Matrix(T, U&&...) */ #ifndef DOXYGEN_GENERATING_OUTPUT - template inline constexpr Matrix4(T first, U&&... next): Matrix(first, std::forward(next)...) {} + template inline constexpr Matrix4(T first, U... next): Matrix(first, next...) {} #else template inline constexpr Matrix4(T first, U&&... next) {} #endif diff --git a/src/Math/Vector.h b/src/Math/Vector.h index 41c8e512b..5b6e1ad4f 100644 --- a/src/Math/Vector.h +++ b/src/Math/Vector.h @@ -67,9 +67,9 @@ template class Vector { * @param next Next values */ #ifndef DOXYGEN_GENERATING_OUTPUT - template inline constexpr Vector(T first, U&&... next): _data{first, std::forward(next)...} {} + template inline constexpr Vector(T first, U... next): _data{first, next...} {} #else - template inline constexpr Vector(T first, U&&... next); + template inline constexpr Vector(T first, U... next); #endif /**