1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-01 17:38:41 +00:00

Some inventory const-ification

This commit is contained in:
Giuseppe Bilotta 2011-08-10 11:38:49 +02:00
parent c007d8219e
commit 467b3cf4c1
3 changed files with 52 additions and 35 deletions

View file

@ -178,9 +178,9 @@ std::string FurnaceNodeMetadata::infoText()
//return "Furnace";
if(m_fuel_time >= m_fuel_totaltime)
{
InventoryList *src_list = m_inventory->getList("src");
const InventoryList *src_list = m_inventory->getList("src");
assert(src_list);
InventoryItem *src_item = src_list->getItem(0);
const InventoryItem *src_item = src_list->getItem(0);
if(src_item)
return "Furnace is out of fuel";
@ -219,7 +219,7 @@ bool FurnaceNodeMetadata::step(float dtime)
InventoryList *src_list = m_inventory->getList("src");
assert(src_list);
InventoryItem *src_item = src_list->getItem(0);
const InventoryItem *src_item = src_list->getItem(0);
// Start only if there are free slots in dst, so that it can
// accomodate any result item
@ -268,7 +268,7 @@ bool FurnaceNodeMetadata::step(float dtime)
InventoryList *fuel_list = m_inventory->getList("fuel");
assert(fuel_list);
InventoryItem *fuel_item = fuel_list->getItem(0);
const InventoryItem *fuel_item = fuel_list->getItem(0);
if(ItemSpec(ITEM_MATERIAL, CONTENT_TREE).checkItem(fuel_item))
{