From ca8eba3a791e02d8bd3faabc88f07c38caab4580 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tin=20=C5=A0vagelj?= Date: Mon, 15 Jul 2024 00:29:43 +0200 Subject: [PATCH] Fix invalid uniform vector init function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tin Å vagelj --- src/geometry.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/geometry.h b/src/geometry.h index 275cfcc2e..f01d8602c 100644 --- a/src/geometry.h +++ b/src/geometry.h @@ -124,8 +124,10 @@ struct vec { vec(vec &&other) { this->value = other->value; } - static inline vec uniform(T x) { - return vec(std::array{x}); + static inline vec uniform(T v) { + std::array data; + data.fill(v); + return vec(data); } /// @brief Returns vec component at `index`.