From 0f438b3e98278f07ca181bc8a6e58078590b16c5 Mon Sep 17 00:00:00 2001 From: Georg Hagen Date: Fri, 29 Nov 2024 01:08:11 +0100 Subject: [PATCH] Remove unnecessary cast --- openVulkanoCpp/Math/DenseVector3i.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openVulkanoCpp/Math/DenseVector3i.hpp b/openVulkanoCpp/Math/DenseVector3i.hpp index 744cd5a..e378e2c 100644 --- a/openVulkanoCpp/Math/DenseVector3i.hpp +++ b/openVulkanoCpp/Math/DenseVector3i.hpp @@ -89,9 +89,9 @@ namespace OpenVulkano::Math constexpr T Data() const { return data; } - [[nodiscard]] constexpr int X() const { T v = data & BITMASK; if (v > MAX_VALUE) v |= ~BITMASK; return reinterpret_cast(v); } - [[nodiscard]] constexpr int Y() const { T v = (data >> (2 * BITS)) & BITMASK; if (v > MAX_VALUE_Y) v |= ~BITMASK; return reinterpret_cast(v); } - [[nodiscard]] constexpr int Z() const { T v = (data >> BITS) & BITMASK; if (v > MAX_VALUE) v |= ~BITMASK; return reinterpret_cast(v); } + [[nodiscard]] constexpr int X() const { T v = data & BITMASK; if (v > MAX_VALUE) v |= ~BITMASK; return v; } + [[nodiscard]] constexpr int Y() const { T v = (data >> (2 * BITS)) & BITMASK; if (v > MAX_VALUE_Y) v |= ~BITMASK; return v; } + [[nodiscard]] constexpr int Z() const { T v = (data >> BITS) & BITMASK; if (v > MAX_VALUE) v |= ~BITMASK; return v; } void SetX(int x) {