avoid returnless fallthrough
This commit is contained in:
parent
86f02eab9b
commit
332fb8430b
@ -15,6 +15,7 @@ LuaValue LuaConverter<InventorySlot>::from(LuaEngine& engine, InventorySlot k) {
|
|||||||
return engine.createString("swap");
|
return engine.createString("swap");
|
||||||
else if (k.is<TrashSlot>())
|
else if (k.is<TrashSlot>())
|
||||||
return engine.createString("trash");
|
return engine.createString("trash");
|
||||||
|
else return {}; // avoid UB if every accounted-for case fails
|
||||||
}
|
}
|
||||||
|
|
||||||
Maybe<InventorySlot> LuaConverter<InventorySlot>::to(LuaEngine&, LuaValue const& v) {
|
Maybe<InventorySlot> LuaConverter<InventorySlot>::to(LuaEngine&, LuaValue const& v) {
|
||||||
|
Loading…
Reference in New Issue
Block a user