mirror of
https://github.com/minetest/minetest.git
synced 2025-01-03 20:07:30 +01:00
Fix false positive compiler warning
This commit is contained in:
parent
a45b04ffb4
commit
18caf3a18d
@ -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())
|
||||||
|
Loading…
Reference in New Issue
Block a user