From 18caf3a18dda95dbd9555cc16a5dcfc9f025cc35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20M=C3=BCller?= <34514239+appgurueu@users.noreply.github.com> Date: Wed, 4 Dec 2024 18:19:12 +0100 Subject: [PATCH] Fix false positive compiler warning --- irr/src/CGLTFMeshFileLoader.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/irr/src/CGLTFMeshFileLoader.cpp b/irr/src/CGLTFMeshFileLoader.cpp index fe67228a7..ce2c41f58 100644 --- a/irr/src/CGLTFMeshFileLoader.cpp +++ b/irr/src/CGLTFMeshFileLoader.cpp @@ -791,7 +791,8 @@ std::optional> SelfType::MeshExtractor::getIndices( index = std::get>(accessor).get(elemIdx); if (index == std::numeric_limits::max()) throw std::runtime_error("invalid index"); - } else if (std::holds_alternative>(accessor)) { + } else { + _IRR_DEBUG_BREAK_IF(!std::holds_alternative>(accessor)); u32 indexWide = std::get>(accessor).get(elemIdx); // Use >= here for consistency. if (indexWide >= std::numeric_limits::max())