diff --git a/include/fastgltf/math.hpp b/include/fastgltf/math.hpp index a827de095..6f193f2d7 100644 --- a/include/fastgltf/math.hpp +++ b/include/fastgltf/math.hpp @@ -93,11 +93,8 @@ namespace fastgltf::math { return ret; } - constexpr vec(const vec& other) noexcept : _data(other._data) {} - constexpr vec& operator=(const vec& other) noexcept { - _data = other._data; - return *this; - } + constexpr vec(const vec&) noexcept = default; + constexpr vec& operator=(const vec& other) noexcept = default; template , bool> = true> constexpr explicit vec(const vec& other) noexcept { @@ -643,6 +640,8 @@ namespace fastgltf::math { copy_values(tuple, std::make_integer_sequence()); } + constexpr mat(const mat& other) = default; + /** Truncates the matrix to a smaller one, discarding the additional rows and/or colums */ template = true> constexpr explicit mat(const mat& other) noexcept { @@ -753,6 +752,11 @@ namespace fastgltf::math { } }; + static_assert(std::is_trivially_copyable_v>); + static_assert(std::is_trivially_copyable_v>); + static_assert(std::is_trivially_copyable_v, 4>>); + static_assert(std::is_trivially_copyable_v>); + /** Transposes the given matrix */ FASTGLTF_EXPORT template [[nodiscard]] auto transpose(const mat& m) noexcept {