mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 16:45:20 +02:00
Replace Optional with std::optional
This commit is contained in:
@@ -446,7 +446,7 @@ int ModApiEnvMod::l_place_node(lua_State *L)
|
||||
return 1;
|
||||
}
|
||||
// Create item to place
|
||||
Optional<ItemStack> item = ItemStack(ndef->get(n).name, 1, 0, idef);
|
||||
std::optional<ItemStack> item = ItemStack(ndef->get(n).name, 1, 0, idef);
|
||||
// Make pointed position
|
||||
PointedThing pointed;
|
||||
pointed.type = POINTEDTHING_NODE;
|
||||
|
@@ -716,7 +716,7 @@ int ObjectRef::l_set_nametag_attributes(lua_State *L)
|
||||
if (read_color(L, -1, &color))
|
||||
prop->nametag_bgcolor = color;
|
||||
} else {
|
||||
prop->nametag_bgcolor = nullopt;
|
||||
prop->nametag_bgcolor = std::nullopt;
|
||||
}
|
||||
}
|
||||
lua_pop(L, 1);
|
||||
|
Reference in New Issue
Block a user