mirror of
https://github.com/minetest/minetest.git
synced 2025-03-06 20:48:40 +01:00
Fix false positive compiler warning
This commit is contained in:
parent
a45b04ffb4
commit
18caf3a18d
1 changed files with 2 additions and 1 deletions
|
@ -791,7 +791,8 @@ std::optional<std::vector<u16>> SelfType::MeshExtractor::getIndices(
|
|||
index = std::get<Accessor<u16>>(accessor).get(elemIdx);
|
||||
if (index == std::numeric_limits<u16>::max())
|
||||
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);
|
||||
// Use >= here for consistency.
|
||||
if (indexWide >= std::numeric_limits<u16>::max())
|
||||
|
|
Loading…
Add table
Reference in a new issue