mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-12 16:15:20 +02:00
Fix false positive compiler warning
This commit is contained in:
@@ -791,7 +791,8 @@ std::optional<std::vector<u16>> SelfType::MeshExtractor::getIndices(
|
|||||||
index = std::get<Accessor<u16>>(accessor).get(elemIdx);
|
index = std::get<Accessor<u16>>(accessor).get(elemIdx);
|
||||||
if (index == std::numeric_limits<u16>::max())
|
if (index == std::numeric_limits<u16>::max())
|
||||||
throw std::runtime_error("invalid index");
|
throw std::runtime_error("invalid index");
|
||||||
} else if (std::holds_alternative<Accessor<u32>>(accessor)) {
|
} else {
|
||||||
|
_IRR_DEBUG_BREAK_IF(!std::holds_alternative<Accessor<u32>>(accessor));
|
||||||
u32 indexWide = std::get<Accessor<u32>>(accessor).get(elemIdx);
|
u32 indexWide = std::get<Accessor<u32>>(accessor).get(elemIdx);
|
||||||
// Use >= here for consistency.
|
// Use >= here for consistency.
|
||||||
if (indexWide >= std::numeric_limits<u16>::max())
|
if (indexWide >= std::numeric_limits<u16>::max())
|
||||||
|
Reference in New Issue
Block a user