From 646eea8c83cf7bd2ca8367b27d8ffb79d698e20d Mon Sep 17 00:00:00 2001 From: Vladyslav Baranovskyi Date: Thu, 3 Oct 2024 11:39:38 +0300 Subject: [PATCH] Inverted conditions in Make5/6 --- openVulkanoCpp/Math/RGB565.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openVulkanoCpp/Math/RGB565.hpp b/openVulkanoCpp/Math/RGB565.hpp index ef86ed6..4a66454 100644 --- a/openVulkanoCpp/Math/RGB565.hpp +++ b/openVulkanoCpp/Math/RGB565.hpp @@ -16,7 +16,7 @@ namespace OpenVulkano::Math template static uint16_t Make5(T val) { - if constexpr (std::is_same_v || std::is_same_v) + if constexpr (!std::is_same_v && !std::is_same_v) { val = std::clamp(val, 0, 255); } @@ -25,7 +25,7 @@ namespace OpenVulkano::Math template static uint16_t Make6(T val) { - if constexpr (std::is_same_v || std::is_same_v) + if constexpr (!std::is_same_v && !std::is_same_v) { val = std::clamp(val, 0, 255); }